Styling RQT

40 views
Skip to first unread message

Marq Rasmussen

unread,
Feb 23, 2016, 10:09:26 AM2/23/16
to SIG for rqt (aka ROS GUI) developers and users
Hello all,

I am new to developing RQT and QT in general. I am wanting to restyle rqt to have different background colors, font, buttons and an overall look. I have downloaded the source code for qt_gui_core and qt to begin studying the code but was hoping for some help from more experienced users.

First off about my system... I am running Ubuntu 14.04 and ROS indigo.

When I started looking into this I thought that I could find the main window .UI file and add style sheets similar to this example. After download the code I see that the main window does not have a .UI file and from what I have found it looks like the overall theme is inherited from the system. Is this true??

If I wanted to re-theme rqt what would be my best starting point? Do I need to re-design and rebuild all of the plugins or will they inherit from the main window?

Thanks for you help and suggestions,
-Marq

Dirk Thomas

unread,
Feb 23, 2016, 1:05:09 PM2/23/16
to ros-s...@googlegroups.com
Hi Marq,

yes, rqt uses the default theme of Qt with no modifications. If you apply general style rules they should affect the whole UI.

[But if would guess that it doesn't work if you use the --multi-process option which runs each plugin in a separate process and embeds their widget into the main window (via X11 embed).]

You should be able to customize the theme as with any Qt application. The QApplication object is instantiated in this function (https://github.com/ros-visualization/qt_gui_core/blob/361165444f39a74d461bc1d8851c7b0bde17bb57/qt_gui/src/qt_gui/main.py#L170-L175) and rqt applies a custsom application in (https://github.com/ros-visualization/rqt/blob/ed4b3311b279993c4c8c852fbb340ca0829a89bc/rqt_gui/src/rqt_gui/main.py#L61-L67).

Cheers,
- Dirk


--
--
To unsubscribe from this group, send email to ros-sig-rqt...@googlegroups.com
Google group at http://groups.google.com/group/ros-sig-rqt?hl=en
rqt: http://ros.org/wiki/rqt

Marq Rasmussen

unread,
Feb 24, 2016, 10:52:03 AM2/24/16
to ros-s...@googlegroups.com
Dirk,

Thanks for the quick response and warnings on the multi-process option!! I will start playing around and see how far I can get :)
Reply all
Reply to author
Forward
0 new messages