Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved] Why is Every dialog title appended with "- application name" ?
Forum Updated to NodeBB v4.3 + New Features

[solved] Why is Every dialog title appended with "- application name" ?

Scheduled Pinned Locked Moved General and Desktop
qt5 windows7 de
8 Posts 4 Posters 5.0k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Richard
    wrote on 24 Jun 2015, 19:19 last edited by Richard
    #1

    Hi,
    I have been programming for about year in QT but what I am still not getting why every dialog in my application has the name of the application appended to it. So my dialog title is "Settings" but when I show this dialog it shows "Settings - MyApp".

    Is it a setting?

    thanks!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on 24 Jun 2015, 20:36 last edited by
      #2

      Hi and welcome to devnet,

      this is not true.
      Have you special settings on your machine?

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 24 Jun 2015, 20:40 last edited by
        #3

        Hi,

        What version of Qt on what OS ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Richard
          wrote on 25 Jun 2015, 03:59 last edited by
          #4

          Hi, Thanks for helping me. Iam running on Windows7Pro - QT 5.2.1.

          P 1 Reply Last reply 25 Jun 2015, 06:45
          0
          • R Richard
            25 Jun 2015, 03:59

            Hi, Thanks for helping me. Iam running on Windows7Pro - QT 5.2.1.

            P Offline
            P Offline
            p3c0
            Moderators
            wrote on 25 Jun 2015, 06:45 last edited by
            #5

            @Richard I think it is because of windowTitle and applicationDisplayName
            See http://doc.qt.io/qt-5/qwidget.html#windowTitle-prop (last paragraph) and http://doc.qt.io/qt-5/qguiapplication.html#applicationDisplayName-prop

            157

            R 1 Reply Last reply 25 Jun 2015, 14:35
            0
            • P p3c0
              25 Jun 2015, 06:45

              @Richard I think it is because of windowTitle and applicationDisplayName
              See http://doc.qt.io/qt-5/qwidget.html#windowTitle-prop (last paragraph) and http://doc.qt.io/qt-5/qguiapplication.html#applicationDisplayName-prop

              R Offline
              R Offline
              Richard
              wrote on 25 Jun 2015, 14:35 last edited by
              #6

              @p3c0
              Thanks a lot , you pointed me to the right direction I called:

              QApplication::setApplicationDisplayName(ApplicationName);
              But I figured this was for the QMainWindow only but this is for all the windows.
              When I do not call this anymore the appending of app name is not happening anymore.

              The Help says:
              This property holds the user-visible name of this application.
              This name is shown to the user, for instance in window titles. It can be translated, if necessary.
              If not set, the application display name defaults to the application name.
              This property was introduced in Qt 5.0.

              IMO pretty vague that this leads to such a major GUI change!!!

              This lead me to the next small issue: I am using setWindowFilePath() on opening a file in my application, this made main window title equal to "file name - app name". When not setting the application display name anymore the main window title becomes "file name", undesirable.

              I can work around it by not calling setWindowFilePath() anymore and instead call setWindowTitle(doc name - appname) but this defeats the purpose of having a function such as setWindowFilePath.

              What I would like to have (and this seems sensible on Windows):
              -No addition of app name in dialogs
              -Addition of app name in QMainWindow and use setWindowFilePath.

              Can someone point me to this solution? thanks.

              P.S. I am using QT5.3.2 not 52.1.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Richard
                wrote on 25 Jun 2015, 15:44 last edited by
                #7

                Some more info from https://msdn.microsoft.com/en-us/library/windows/desktop/dn742478(v=vs.85).aspx

                Title bar text
                Choose the title bar text based on the type of window:
                Top-level, document-centric program windows: Use a "document name — program name" format. Document names are displayed first to give a document-centric feel.
                Top-level program windows that are not document-centric: Display the program name only.
                Dialog boxes: Display the command, feature, or program from which the dialog box came. Don't use the title to explain the dialog box's purpose—that's the purpose of the main instructions. For more guidelines, see Dialog Boxes.
                Wizards: Display the wizard name. Note that the word "wizard" should not be included in wizard names. For more guidelines, see Wizards.

                So now it all comes down to definition.. I guess the default QT behaviour is ok. But would be nice to overrule per dialog!!

                P 1 Reply Last reply 26 Jun 2015, 08:04
                0
                • R Richard
                  25 Jun 2015, 15:44

                  Some more info from https://msdn.microsoft.com/en-us/library/windows/desktop/dn742478(v=vs.85).aspx

                  Title bar text
                  Choose the title bar text based on the type of window:
                  Top-level, document-centric program windows: Use a "document name — program name" format. Document names are displayed first to give a document-centric feel.
                  Top-level program windows that are not document-centric: Display the program name only.
                  Dialog boxes: Display the command, feature, or program from which the dialog box came. Don't use the title to explain the dialog box's purpose—that's the purpose of the main instructions. For more guidelines, see Dialog Boxes.
                  Wizards: Display the wizard name. Note that the word "wizard" should not be included in wizard names. For more guidelines, see Wizards.

                  So now it all comes down to definition.. I guess the default QT behaviour is ok. But would be nice to overrule per dialog!!

                  P Offline
                  P Offline
                  p3c0
                  Moderators
                  wrote on 26 Jun 2015, 08:04 last edited by
                  #8

                  @Richard setApplicationDisplayName will set the name application wide and thus it will be visible on all windows. No point it having a different application names for all the windows originating from the application.
                  You can use setWindowTitle to set title per dialog.

                  157

                  1 Reply Last reply
                  0

                  2/8

                  24 Jun 2015, 20:36

                  topic:navigator.unread, 6
                  • Login

                  • Login or register to search.
                  2 out of 8
                  • First post
                    2/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved