Results 1 to 3 of 3

Thread: How to access the "?" menu button in QWidget

  1. #1
    Join Date
    May 2015
    Posts
    42
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default How to access the "?" menu button in QWidget

    Hallo Everybody,

    i have a simple dialog-widget made in Designer. QDialog inherits QWidget, right?

    Qt Code:
    1. class inputdialog : public QDialog
    2. {
    3.  
    4. public: ...the constructor
    5.  
    6. private:
    7.  
    8. UI:inputdialog *ui;
    9. ...
    To copy to clipboard, switch view to plain text mode 

    Normally I take the rough road and code them on my own, but I gave it a try. Now I have a menubutton wich looks like "?", which certainly means "help" or "about".
    When I press this button the widget seems to fall in an undefined state. The mousecursor shows the "forbidden" sign an then it turns into a "beam". After some seconds it returns to normal. Therefore I would not just ignore it.

    Question: How do I access this thing? Fill it with actions, switch it off, ..whatever. I didn't find an entry in the prefs of my widget in the designer. Nor I'm very familiar with this product.

    Any help as always highly appreciated.

    regards, Lars

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to access the "?" menu button in QWidget

    Quote Originally Posted by mustermann.klaus@gmx.de View Post
    QDialog inherits QWidget, right?
    Correct

    Quote Originally Posted by mustermann.klaus@gmx.de View Post
    Now I have a menubutton wich looks like "?", which certainly means "help" or "about".
    Without screenshot this is a guess, but this could be a "What's This" button.

    See QWhatsThis.

    Usually that would not be enabled by default though, maybe you entered some what's this data for the dialog or some of its widgets?

    Cheers,
    _

  3. #3
    Join Date
    May 2015
    Posts
    42
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to access the "?" menu button in QWidget

    this could be a "What's This" button.
    Yes. This is what I found out in the meantime.

    Usually that would not be enabled by default though, maybe you entered some what's this data for the dialog or some of its widgets?
    No. I didn't activate anything, nor have entered any information. I never use whats This. I prefer tooltips. But if I do so, because now I know it's the whatsThis-feature, and use it, the strange behaviour turns into some not very pleasant different behaviour.

    Somehow I cannot upload screenshots. Perhaps it's the firewall blocking here. Sorry, I actually tried but didn't say so explicitely.

    The remaining question now is how to switch off and hide the "?".

    regards, Lars

    this could be a "What's This" button.
    Yes. This is what I found out in the meantime.

    Usually that would not be enabled by default though, maybe you entered some what's this data for the dialog or some of its widgets?
    No. I didn't activate anything, nor have entered any information. I never use whats This. I prefer tooltips. But if I do so, because now I know it's the whatsThis-feature, and use it, the strange behaviour turns into some not very pleasant different behaviour.

    Somehow I cannot upload screenshots. Perhaps it's the firewall blocking here. Sorry, I actually tried but didn't say so explicitely.

    The remaining question now is how to switch off and hide the "?".

    regards, Lars

    this could be a "What's This" button.
    Yes. This is what I found out in the meantime.

    Usually that would not be enabled by default though, maybe you entered some what's this data for the dialog or some of its widgets?
    No. I didn't activate anything, nor have entered any information. I never use whats This. I prefer tooltips. But if I do so, because now I know it's the whatsThis-feature, and use it, the strange behaviour turns into some not very pleasant different behaviour.

    Somehow I cannot upload screenshots. Perhaps it's the firewall blocking here. Sorry, I actually tried but didn't say so explicitely.

    The remaining question now is how to switch off and hide the "?".

    regards, Lars


    Added after 36 minutes:


    I found
    Qt Code:
    1. setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
    To copy to clipboard, switch view to plain text mode 

    Hard to find the right question sometimes.

    Thanks Everybody.
    Last edited by mustermann.klaus@gmx.de; 18th April 2019 at 15:06.

Similar Threads

  1. Replies: 1
    Last Post: 1st April 2017, 22:13
  2. Replies: 2
    Last Post: 11th May 2012, 11:38
  3. Replies: 3
    Last Post: 8th December 2011, 20:21
  4. "new" + "delete" a QWidget and its children
    By vkincaid in forum Qt Programming
    Replies: 2
    Last Post: 19th January 2010, 22:51

Tags for this Thread

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.