# Splash Screen Showing Version Number

**URL:** <https://discourse.slicer.org/t/splash-screen-showing-version-number/804>\
**Category:** Development\
**Created:** [August 1, 2017, 5:05pm UTC](https://discourse.slicer.org/t/splash-screen-showing-version-number/804 "2017-08-01T17:05:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![moselhy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moselhy/32/501_2.png) [@moselhy](https://discourse.slicer.org/u/moselhy)\
**Post date:** [August 1, 2017, 5:05pm UTC](https://discourse.slicer.org/t/splash-screen-showing-version-number/804/1 "2017-08-01T17:05:11Z")

</div>

I think it would be nice if the splash screen displayed the version number in the top-right corner. Like this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/0/603ae3c6a636497b7c03f6ba5d4257d451e1d063.jpeg)

I am having a hard time implementing a static message (version number), because the [showMessage() function](https://github.com/Slicer/Slicer/blob/master/Applications/SlicerApp/Main.cxx#L89) is made for dynamic messages only.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [August 1, 2017, 5:21pm UTC](https://discourse.slicer.org/t/splash-screen-showing-version-number/804/2 "2017-08-01T17:21:52Z")

</div>

Hi,

To provide some more context, the splashscreen is displayed at two different times:

- by the [application launcher](https://github.com/commontk/AppLauncher) while the application is loaded.
- by the Slicer application itself while the modules are loaded

If you would like the version info to be visible through the entire loading time, both steps should probably be considered.

A simple solution (but not so elegant) would be to regenerate a new splashscreen daily. The cons of this approach is that it would bloat the Slicer history …

A more complete solution would be to teach both Slicer and the launcher to display version on top of the splashscreen

---

<div class="post-metadata">

**Author:** ![moselhy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moselhy/32/501_2.png) [@moselhy](https://discourse.slicer.org/u/moselhy)\
**Post date:** [August 1, 2017, 5:24pm UTC](https://discourse.slicer.org/t/splash-screen-showing-version-number/804/3 "2017-08-01T17:24:00Z")

</div>

> A more complete solution would be to teach both Slicer and the launcher to display version on top of the splashscreen

Would it be efficient to connect the version display function to the messageChanged signal of the splash screen? If not, is there a better way?

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [August 1, 2017, 5:42pm UTC](https://discourse.slicer.org/t/splash-screen-showing-version-number/804/4 "2017-08-01T17:42:10Z")

</div>

> [@moselhy](#):
>
> If not, is there a better way?

I do not think connecting to `messageChanged` will be helpful. A possible approach would be subclass `QSplashScreen` into `ctkSplashScreen` by adding a method like `showCornerMessage(const QString& msg, Qt::Corner corner)`.

The `ctkSplashScreen` class could be added to [CTK](https://github.com/commontk/CTK) and then reused in both Slicer and the launcher.

You could look at `QSplashScreen::drawContents(QPainter *painter)` to understand how the Qt API works.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 1, 2017, 5:54pm UTC](https://discourse.slicer.org/t/splash-screen-showing-version-number/804/5 "2017-08-01T17:54:41Z")

</div>

Do you really need to show versin info in the splash screen? We already have an about dialog that shows detailed version information and version is always visible in the title bar as well. Splash screen is only shown for a couple of seconds and you cannot copy-paste from it, so I think overall the about box is more useful.

---

<div class="post-metadata">

**Author:** ![moselhy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moselhy/32/501_2.png) [@moselhy](https://discourse.slicer.org/u/moselhy)\
**Post date:** [August 1, 2017, 6:04pm UTC](https://discourse.slicer.org/t/splash-screen-showing-version-number/804/6 "2017-08-01T18:04:44Z")

</div>

It would be convenient for me because I have a button to terminate the Slicer process, which I could easily click if I find that I am loading the incorrect version of Slicer. It could be useful for other users having a similar setup to me.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 1, 2017, 6:24pm UTC](https://discourse.slicer.org/t/splash-screen-showing-version-number/804/7 "2017-08-01T18:24:59Z")

</div>

I see. This use case makes sense but it is very narrow and I would not encourage anyone to to forcefully terminate an application (in unfortunate cases it might corrupt settings files etc).
