[Release] Qt dark orange stylesheet

qt

#21

Hi all, this is my first message here. Thanks for this beautiful stylesheet !
I try use the darkorange stylesheet in a python application, but it seems QMdiSubwindows are not styled :

Can I do something to solve this ?


#22

Well you can add it into the stylesheet and give it some colors I guess =}
Just check the documentation it has examples on every single widget!


#23

To be honest, I’m a complete newbie with Qt stylesheets :D:
I tried different parameters without success : buttons on the title bar always disappear when I change something.

Here is some unsuccessful try :

QMdiSubWindow:title{
    background: #404040;
   border: 2px solid 000000;
   border-radius:4px;
   titlebar-close-icon: url("images/down_arrow.png");
}

QMdiSubWindow:title::close-button{
    image: url("images/down_arrow.png"); 
    height: 40px; 

}


#24

I can’t find ‘QMdiSubwindow’ in the stylesheet reference : http://qt-project.org/doc/qt-4.8/stylesheet-reference.html
Do I miss something ?


#25

Never had any experience with QT style sheets other than switching them in 2011/201 Maya.

Is it possible to use this with Maya. Love the Tech_artists look and being a Foundry user, this just feels right to have Maya look like this too! :D:

Thanks!

Matt -


#26

Sure ^^

from PyQt4 import QtGui

QtGui.QApplication.qApp.setStyleSheet(“content of style”) :stuck_out_tongue:

don’t forget to import the compiled (into *.py) resource xml for the two images I used :slight_smile:

Jromang I think I read somewhere that QMdiSubWindow doesn’t allow styling, yet! Maybe in a later version of Qt


#27

This is really great, thanks for sharing! I have been wanting to create a dark stylesheet for awhile but just haven’t had the time.

I’m finding that the color of inactive tabs and radio/checkbox buttons is not styled correctly as it is in the Qt Designer preview. Any idea why this might be? This is on Python 2.5 and PyQt 4.4.3.


#28

Are you sitting on mac? I had that issue as well. Don’t have a VM here so can’t test :frowning:


#29

No, I am on Windows 7.

I tweaked the stylesheet to get something that works OK for me. I’m not sure if it is what you are going for, but here it is. I had to add a checkbox graphic to the resource file. All images are included in the zip.

<RCC>
  <qresource>
    <file>images/checkbox.png</file>
    <file alias="down_arrow.png">images/down_arrow.png</file>
    <file>images/handle.png</file>
  </qresource>
</RCC>

#30

Looks perfect to me :slight_smile:
Mind if I update the one on the internet in case others get the same issue by downloading the one I provided?


#31

Mind if I update the one on the internet in case others get the same issue by downloading the one I provided?

Sure! Just fyi, I removed the widget “focus” orange border since I didn’t need it for my application, and instead used that border style as “hover” for buttons and combo boxes.


#32

I added a few more tweaks today to the tabs and menu items. Here’s the latest.


#33

Imba!

I’ll update the one I have online now :slight_smile:

Thanks man I appreciate it =}


#34

Hey I just tested the stylesheet you provided, my tabs doesn’t look like that, alot of spaces inbetween and the gradient is alot different :frowning:

Anyway seems like people have problems I don’t, and I have problems you guys don’t. Not sure if it’s versioning differences or anything else.

The tabs doesn’t have support for vertical layout aka :left :right, it only looks good on :top and :bottom so I’ll go ahead and add it :slight_smile:


#35

Hey guys, thanks for the hints through this thread. I made a new script called MayaStylin’ which applies a Qt style sheet to all of Maya’s UI. There’s a dark theme (based on the one here but taken way further) and a light theme. It has multiple colour options. I made it part of my Graph Editor Redux tool but the script can be incorporated into other tools as well.

[http://www.creativecrash.com/maya/downloads/scripts-plugins/animation/c/mayastylin-graph-editor-redux-digital-pose-test--2


](http://www.creativecrash.com/maya/downloads/scripts-plugins/animation/c/mayastylin-graph-editor-redux-digital-pose-test--2)


#36

Hi,
Thanks for sharing this nice style !

Anyway, I’ve download images, stylesheet, done the xml file, compiled it into py with pyrcc4 , but now how can I have it used in some of my pyqt UIs ? Never played with qt style so I know nothing about this.


#37

just wrap the entire stylesheet in a python multiline comment: qss = “”" content of stylesheet file “”"

Then you can do app.setStyleSheet( qss )

You might also want to do app.setStyle(“plastique”)


#38

or alternatively,yoo can create a separate qss file, read its text in as the string and have some sharing ability. you could also create a py file with the style and script that you can just import and run a oneliner (its what we have at work)


#39

wow ! many thanks ! simple, and works like a charm !!

happy xmas everyone :cool:


#40

Hello everyone,

Sorry but I did’nt understand few points on dgovil’s msg, and it seems to be a strong technique so :

[QUOTE=dgovil;19521]some sharing ability. [/QUOTE] (just put the qss on a network ? or is it a feature inside the file ?)

[QUOTE=dgovil;19521] you could also create a py file with the style and script that you can just import and run a oneliner [/QUOTE] Is this python importing the qss file above ? or do I missed the train …