Modifying dock label css

220 views
Skip to first unread message

Matjaz

unread,
Jan 8, 2015, 9:25:00 AM1/8/15
to pyqt...@googlegroups.com
Hi.

The dock system in pyqtgraph is super useful but the color/font theme does not really work well for my application. I would like to modify it. I can do this by going to dock.py and changing css inside the DockLabel class. Ofcourse i would have problems when distributing this code.

Is there a way to change the style from outside of pyqtgraph? Are there any plans to open this up so the interface can be changed through Dock class or similar?


kind regards,


mm

Mathew Schwartz

unread,
Jan 27, 2015, 8:00:19 PM1/27/15
to pyqt...@googlegroups.com
Have you tried the setStyleSheet method?  For example, in the examples of Dock widgets, you can change the background of d2 by adding:
d2.setStyleSheet("background-color:yellow")

--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/5f4436d2-4f7d-4c7f-9b11-5e7ba598814c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matjaz

unread,
Feb 2, 2015, 3:09:45 AM2/2/15
to pyqt...@googlegroups.com
This doesn't do it. It just changes the background of the widget in the window.

Mathew Schwartz

unread,
Feb 2, 2015, 4:17:20 AM2/2/15
to pyqt...@googlegroups.com
So what do you want?  Of course it only changes the background color, it says "backgroung-color:"...

Matjaz

unread,
Feb 2, 2015, 4:23:27 AM2/2/15
to pyqt...@googlegroups.com
:D I want to change the styling of the tab and the label.

I highlighted the area I want to change with yellow:

Matjaz

unread,
Mar 15, 2015, 1:57:29 PM3/15/15
to pyqt...@googlegroups.com
This is the workaround I am using right now - may be useful to somebody:

Reply all
Reply to author
Forward
0 new messages