[Release] Qt dark orange stylesheet

qt

#41

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.


#42

Thank you , I get it now !


#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


#44

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()


#45

ok, the problem came from the scrollbar layout which also need margin
ScrollLayout.setMargin(0)


#46

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:


#47


#48

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


#49

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


#50

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


#51

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


#52

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


#53

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:


#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 ?