Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved minimize and context help buttons on my QDialog

    General and Desktop
    5
    6
    3680
    Loading More Posts
    • 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.
    • kaleem
      kaleem last edited by kaleem

      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 Reply Quote 0
      • R
        rturrentine last edited by

        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 Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          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

          kaleem 1 Reply Last reply Reply Quote 0
          • A
            alex_malyu last edited by

            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 Reply Quote 1
            • kaleem
              kaleem @SGaist last edited by

              @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 Reply Quote 0
              • mrjj
                mrjj Lifetime Qt Champion last edited by

                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 Reply Quote 0
                • First post
                  Last post