PDA

View Full Version : how to rewrite QStyle



trytoremeber963
28th April 2009, 02:40
1,what is different between drawPrimitive and drawControl ,and how to use?
2,what is different between polish(QApplication ) ,polish(QWidget *) and polish(QPalette ),
and how to use?
3,which is better ,QStyle or StyleSheet?

jpn
28th April 2009, 06:18
Read the fine manual: QStyle

trytoremeber963
28th April 2009, 07:18
thanks at first ,i have read the doc several times ,
QPushButton for examples
int drawControl can use CE_PushButton to control it
as well in drawPrimitvie can use PE_PanelButtonCommand change it
what is different between ?

when i rewrite the polish use QApplication ,QWidget and QPalette ,they look like all the same , is nothing diff along them?

wysota
28th April 2009, 08:18
The difference between polishing a widget and polishing the application is the same as setting a style on a widget and setting it on an application.