desch
28th November 2007, 09:26
Hi everybody,
Description
I have a QAction with an icon
the QAction is set in Qmenu with
menu->addAction(myAction)
on a widget inside the application, I have a QToolButton with the following code
myQToolButton->setDefaultAction(myAction)
this is done to have different access to the same action in different place
the style sheet is the following:
QToolButton#myQToolButton{image: url(:/image.png);}
QToolButton#myQToolButton:hover{image: url(:/image_rollover);}
QToolButton#myQToolButton:pressed{image: url(:/image_pushed);}
QToolButton#myQToolButton:disabled{image: url(:/image_disabled);}
so the first question:
In understand that the QtoolButtoin is connected with the action but
how to remove the icon in QtoolButton to set correctly the style sheet inside?
So my second question relative to the first question:
If it's not possible to remove icon, How to set the style to an action inside a QMenu in order to get the same style to the Qmenu AND to the ToolButton
Thanks to all
David
Description
I have a QAction with an icon
the QAction is set in Qmenu with
menu->addAction(myAction)
on a widget inside the application, I have a QToolButton with the following code
myQToolButton->setDefaultAction(myAction)
this is done to have different access to the same action in different place
the style sheet is the following:
QToolButton#myQToolButton{image: url(:/image.png);}
QToolButton#myQToolButton:hover{image: url(:/image_rollover);}
QToolButton#myQToolButton:pressed{image: url(:/image_pushed);}
QToolButton#myQToolButton:disabled{image: url(:/image_disabled);}
so the first question:
In understand that the QtoolButtoin is connected with the action but
how to remove the icon in QtoolButton to set correctly the style sheet inside?
So my second question relative to the first question:
If it's not possible to remove icon, How to set the style to an action inside a QMenu in order to get the same style to the Qmenu AND to the ToolButton
Thanks to all
David