Results 1 to 3 of 3

Thread: Force dialog to have WhatsThis title bar button

  1. #1
    Join Date
    Mar 2006
    Posts
    74
    Thanks
    1
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows

    Default Force dialog to have WhatsThis title bar button

    I would like a dialog to display the "?" whats this button in the title bar. This is a Windows app and I am currently running Windows 7 on my dev machine. I have tried

    MyDialog::MyDialog(QWidget* parent)
    : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMaximizeButtonHint | Qt::WindowContextHelpButtonHint)

    but the "?" button does not appear. I know that this is OS dependent and that the WindowFlags are hints and not commands and I suspect that this button not appearing has something to do with the OS (version?). But there has to be a way to force it to appear so that users have a visible way to go into What This mode. How is this done?

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Force dialog to have WhatsThis title bar button

    QDialog, by default has the Context Help button (or WhatIsThis), do not set any flags, it will appear.

    If you are looking for Context Help button and Maximize button to co-exist then that is not possible, Windows does not support it.

    Refer Here
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Mar 2006
    Posts
    74
    Thanks
    1
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Force dialog to have WhatsThis title bar button

    Thanks that helped. I keep forgetting the the window hints behave differently on different OS/Windowing systems. IE. with X11 you can have min/max buttons along with the What's This button in the title bar but not on Windows.

Similar Threads

  1. Replies: 2
    Last Post: 26th April 2011, 11:44
  2. WhatsThis button in QMainWindow
    By _Jack_ in forum Newbie
    Replies: 8
    Last Post: 23rd October 2010, 09:58
  3. Getting rid of Dialog Title Bar
    By skepticalgeek in forum Qt Programming
    Replies: 2
    Last Post: 15th July 2010, 23:09
  4. How can I add a custom button to a QWidget's title bar
    By JPNaude in forum Qt Programming
    Replies: 4
    Last Post: 22nd February 2010, 10:40
  5. QMessageBox - no dialog title on Mac OS?
    By will49 in forum Qt Programming
    Replies: 1
    Last Post: 8th October 2007, 14:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.