qss.py has style = “”" content of stylesheet “”". Then what you do is: from qss import style and apply the style as mentioned earlier or handle it automatically inside qss.py itself since the app is singleton, then you would only need to import qss (app must have been constructed already though).
or you have a style.qss (extension and name doesn’t matter) that you open as a regular file and read in the content, close the file and apply the style.
I just use the first one where I do manual: from qss import style.
Thank you , I get it now !
KiboOst
December 30, 2012, 11:14am
43
You should add this into the spreadsheet file :
QScrollArea:focus
{
border: 1px solid black;
}
It not, you will have a flashy blue 2px line around your scrollaeras when it get focus.
I’ve put it at top of scrollbar section in mine
Thks again
Kib
Another thing, how can I remove the margins around the widget ?
a simple code :
class MainWindows(QtGui.QWidget):
def __init__(self):
QtGui.QWidget.__init__(self)
self.setGeometry(800, 400, 800, 250)
self.setContentsMargins(0, 0, 0, 0)
self.widget = QtGui.QWidget()
self.GridLayout = QtGui.QGridLayout()
self.GridLayout.setMargin(2)
self.GridLayout.setHorizontalSpacing(2)
self.GridLayout.setVerticalSpacing(2)
self.populate() # content !
self.widget.setLayout(self.GridLayout)
scrollArea = QtGui.QScrollArea()
scrollArea.setWidget(self.widget)
scrollArea.setWidgetResizable(True)
ScrollLayout = QtGui.QVBoxLayout()
ScrollLayout.addWidget(scrollArea)
self.setLayout(ScrollLayout)
self.show()
ok, the problem came from the scrollbar layout which also need margin
ScrollLayout.setMargin(0)
Thank you Lonewolf for sharing your template, I really like it.
It was of great help to me to get started quicker with my own.
I have used it as a base to define the new default theme of MakeHuman.
EDIT: It is now also officially announced on our webpage: http://www.makehuman.org/node/564
With this post I take the opportunity of becoming a posting member here, instead of being only a lurker
Cool stuff Glad it was useful for ya all!
marcuso
January 21, 2013, 3:01pm
49
Agreed! This qss helped me getting started aswell. Really good of you to share, Yasin.
sanjeev
January 21, 2013, 11:03pm
50
[QUOTE=LoneWolf;19929]Cool stuff Glad it was useful for ya all![/QUOTE]
you are awesome. thanks . it gives a good starting point.
cgjedi
January 22, 2013, 8:00am
51
Remember that I’ve taken the basic style and have added ‘variables’; something css doesn’t support.
nkint
June 24, 2013, 3:37pm
52
hei! this is my first message in the forum and well, thank you! the css is awesome!
Lumyo
February 22, 2017, 7:57am
53
Thanks for this stylesheet ! Very nice
I made a github repo with the stylesheet and images compiled, for those who would be lazy to do it
Contribute to Lumyo/darkorange-pyside-stylesheet development by creating an account on GitHub.
2 Likes
seghier
September 16, 2017, 6:32pm
54
thank
that good but how to apply this theme to my app ?
i create UI and python script and choose plastique theme ; how i can apply the dark theme ?