Can I layout widgets by using StyleSheet?
So,Can I use stylesheet to layout my widgets?
For example,I want myFrame(QFrame) set to x:30px,y:30px.And I also want to set the width&height.In this way,people can theme my app by themselves.
But I think it's probably not possible...I need verification.:)
Re: Can I layout widgets by using StyleSheet?
I finally figure it out myself.
for somebody who wants to know how,see the stylesheet below:
Code:
background: url(:/Pics/TitleBG.png) no-repeat;
qproperty-geometry:rect(0 0 252 35);
}
set the qproperty-geometry to be rect(x,y,width,height).
Re: Can I layout widgets by using StyleSheet?
I am not sure what application you are doing, but please don't layout your widgets manualy. Use layouts for that! They are much better than manual layout!!! See QHBoxLayout for example and make yourself familiar with the layout concept of Qt...
Re: Can I layout widgets by using StyleSheet?
Yeah,I know Layout is good.But the interface of the app I'm building is not so complex.And if I manualy layout my widgets,I can use stylesheet to theme my app better.
Re: Can I layout widgets by using StyleSheet?
Maybe you want to use QML (or Qt Quick)