Unsolved Checkable QActions have both icon and checkbox (they should only have icon)
-
I have a QMenu filled with some QActions, each action has an icon. When I set the action to checkable, the icon is printed over with some kind of dotted pattern, with an apparent checkbox. When I hover over the action, the icon disappears completely, and the checkbox is visible. When I check an action, the icon appears cleanly, but all the other icons still have the check box/icon hybrid look to them.
Previously, this has worked fine in the system where I had created a QMenu on the spot, constructed QActions there, populated the menu, and associated it with a tool button. I had refactored the menu out as a separate class inheriting from QMenu, and I had refactored the toolbar containing these buttons out of the overall widget as a separate widget. I don't see how either of those steps should induce this behaviour. I've checked that the stylesheets are the same on both widgets and buttons.
system = Qt5.5, Ubuntu 16.04
Followup: Previously the QMenu to which these actions belong was constructed without a parent widget. When the QMenu was constructed with the widget being the parent widget, this bad behaviour arose. That should at least help solve some of my problem, to construct menus without parents, but it's still an unexpected result and unclear why it should happen.
-
Hi,
Are you using the Qt version provided with Ubuntu ?