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. minimize and context help buttons on my QDialog
Forum Updated to NodeBB v4.3 + New Features

minimize and context help buttons on my QDialog

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 5 Posters 4.2k Views 3 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.
  • kaleemK Offline
    kaleemK Offline
    kaleem
    wrote on last edited by kaleem
    #1

    I would like to show both the minimize and context help buttons on my QDialog derived dialogs. I'm using Qt 4.2. and I can't seem to do it using setWindowFlags. I have my own dialog class that is subclassed from QDialog. In the constructor I call:

    setWindowFlags( windowFlags() | Qt::WindowMinimizeButtonHint | Qt::WindowContextHelpButtonHint );
    The minimize and maximum buttons show (as well as the close button) however the "?" help button does not. The only way I can show the help button is if I do not show minimize or maximize.

    Any suggestions?

    Thanks

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rturrentine
      wrote on last edited by
      #2

      I had this issue earlier too but never resolved it. I could not get the minimize/maximize buttons and the help button at the same time. If I had the min/max hint set, it always ignores the help hint. If I only set the hint for help, then I get the help button.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Can you share your dialog setup code ?

        Also Qt 4.2 ? Are you locked to that very old version ?

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

        kaleemK 1 Reply Last reply
        0
        • A Offline
          A Offline
          alex_malyu
          wrote on last edited by
          #4

          It is not possible for Context Help button and Maximize button to co-exist on Windows.
          System does not allow it.

          1 Reply Last reply
          1
          • SGaistS SGaist

            Hi and welcome to devnet,

            Can you share your dialog setup code ?

            Also Qt 4.2 ? Are you locked to that very old version ?

            kaleemK Offline
            kaleemK Offline
            kaleem
            wrote on last edited by
            #5

            @SGaist sorry correction my QT version is 4.4.3 not 4.2
            Following is my code in constructor of class which is inheriting QDialog
            fl = Qt::Window | Qt::WindowContextHelpButtonHint | Qt::WindowMaximizeButtonHint
            | Qt::WindowMinimizeButtonHint;
            this->setWindowFlags(fl);
            Thanks,

            1 Reply Last reply
            0
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi
              If you load the
              http://doc.qt.io/qt-5/qtwidgets-widgets-windowflags-example.html
              example

              you will see that combination is not possible.
              As @alex_malyu already pointed out. :)

              1 Reply Last reply
              0

              • Login

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