0

I would like to have an element of a popup menu that doesn't react to user inputs: click, hover, etc. but that doesn't look greyed out as when I disable it.

I have a QMenu to which I add a QAction

QMenu* menu// Further code creating the menu ...
QAction* titleAction = menu->addAction(QString::fromStdString("The Title"));
titleAction->setEnabled(false);

I have no experience with Qt. Maybe what I am doing is not the right approach to get what I want.

I tried setting the font

titleAction->font().setBold(true);

This is not enough to make it not be greyed out. Maybe it is not even a QAction what I should be inserting in the menu but some other type of object. I need some initial guidance of what I should be trying to do, not so much the code but the philosophy of the QMenu for an entry that behaves like I said.

AOlov
  • 1

0 Answers0