PDA

View Full Version : How to access the "?" menu button in QWidget



mustermann.klaus@gmx.de
18th April 2019, 11:13
Hallo Everybody,

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



class inputdialog : public QDialog
{
QObject

public: ...the constructor

private:

UI:inputdialog *ui;
...


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

anda_skoa
18th April 2019, 12:10
QDialog inherits QWidget, right?

Correct



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,
_

mustermann.klaus@gmx.de
18th April 2019, 14:09
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
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

Hard to find the right question sometimes.

Thanks Everybody.