[Release] Qt dark orange stylesheet

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 !

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 :wink:

Cool stuff :slight_smile: Glad it was useful for ya all!

Agreed! This qss helped me getting started aswell. Really good of you to share, Yasin.

you are awesome. thanks . it gives a good starting point.

Remember that I’ve taken the basic style and have added ‘variables’; something css doesn’t support.

hei! this is my first message in the forum and well, thank you! the css is awesome!

Thanks for this stylesheet ! Very nice :slight_smile:

I made a github repo with the stylesheet and images compiled, for those who would be lazy to do it :slight_smile:

2 Likes

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 ?