fruzzo
19th June 2012, 09:39
Hi,
I have a ini file from which I have to load some settings such as widget colors and sizes.
I'm implementing a new qstyle customized according to the settings loaded from the ini file (i.e. I read this file in the new qstyle constructor).
About colors I haven't problems, I read the info from file and set the qpalette properties...instead about widget sizes I have some problems.
QStyle uses qstyleoption subclasses to draw the different widgets, specially about its sizes so how can I set a fixed size for a specific widget through qstyle? For example, if I want to set the size 100x50 fro all the qpushbutton present in my gui, what's the easy way to do this without
using a style sheet?
I have a ini file from which I have to load some settings such as widget colors and sizes.
I'm implementing a new qstyle customized according to the settings loaded from the ini file (i.e. I read this file in the new qstyle constructor).
About colors I haven't problems, I read the info from file and set the qpalette properties...instead about widget sizes I have some problems.
QStyle uses qstyleoption subclasses to draw the different widgets, specially about its sizes so how can I set a fixed size for a specific widget through qstyle? For example, if I want to set the size 100x50 fro all the qpushbutton present in my gui, what's the easy way to do this without
using a style sheet?