PDA

View Full Version : QMenu item icon size



Geraud
12th November 2013, 21:52
Hello,

First of all, I would like to precise that I did go through the different solutions presented on this forum to change the sizes of the icons inside a style.

Here is my problem:

I am trying to style a QMenu using a QSS file, but I cannot find how to set the icon size.

If I use a special style (as in http://www.qtcentre.org/threads/4173-Why-does-QMenuBar-resize-icons), my own style gets overriden and although the icon style is correct, everything else is wrongly displayed.

Any ideas?
- what is the CSS keyword to set the icon style?
- if none such thing exists, is it possible to apply just a "portion" of a style?

Addendum: if I do this:
myObject->setStyle(myStyle);
myObject->setObjectName("MyObject");
myObject->setStyleSheet("#Dummy {border: none;}");

It works and both the icon sizes are right, and my stylesheet is being used. Note that the "set style sheet" is absolutely doing nothing, but if not there, no styling.

Thank you,

Geraud