mercredi 4 juillet 2018

How to change the color of a QAction that is in a toolbar? Qt c++

I have a toolbar or there are several QActions. I would like to change the color of the QAction when it is selected so that the user can see the chosen action.

The problem is that QAction is not a QWidget so we can not use stylesheet. Is there a way to get around this problem? Or would it be better to declare QPushButton instead of QAction in my toolbar?

I would like, for example, that if I click on a QAction it is pushed against the others.I have 6 QAction declared in my toolbar.

Aucun commentaire:

Enregistrer un commentaire