PDA

View Full Version : QSS problem



Sir Rogers
16th November 2009, 17:17
Hey guys,

I've been trying around all afternoon but I can't seem to solve this issue.
I am creating an application and I want to give the users the possibility to modify the design to their heart's content.

But I can't seem to be able to change the position/size of an object.

For example we have this QPushButton named cmdStart.

I could do "#cmdStart { color : blue; }" but trying to set size or position has failed miserably.
I've browsed the web for hours and found examples where it set the position to absolute, then set top and left, but even that didn't work. I'm totally exhausted now and really need some help, I can't find the solution on my own. Thanks in advance.


Regards,
Sir Rogers

aamer4yu
17th November 2009, 05:12
I guess you need to mention the object type too..(not sure though)
something like -
"QPushButton#cmdStart { color : blue; }"

Sir Rogers
17th November 2009, 05:29
I guess you need to mention the object type too..(not sure though)
something like -
"QPushButton#cmdStart { color : blue; }"

It doesn't matter, and yes I tried with and without. I can't get the right attribute to set size or position.

I tried so many things from qproperty all the way down to the normal css attributes, none worked. Could someone please tell me the right attributes to use?

The problem's driving me crazy.


Regards,
Sir Rogers

spirit
17th November 2009, 06:47
there is note in height/width properties in spec


height:
Warning: Unless otherwise specified, this property has no effect when set on widgets. If you want a widget with a fixed height, set the min-height and max-height to the same value.

width:
Unless otherwise specified, this property has no effect when set on widgets. If you want a widget with a fixed width, set the min-width and max-width to the same value.

changing positions can be applied only for sub-controls.