Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt: How to create a setting window like in GTK

In Qt 4.8 I want to create a window that looks like the following.

example window

please note that my main concern is the tab-like behaviour of left-side icon+text combination.

The question is what would you recommend me to achieve that look? A QListWidget or a customized QTabWidget?

thanks

like image 540
destan Avatar asked Mar 14 '12 12:03

destan


1 Answers

Qt Creator - which is written in Qt - has a settings page which might just be what you want:

Qt Creator options dialog

I would look into the source code of that at http://qt.gitorious.org/qt-creator/qt-creator/trees/master

[Edit] Found the relevant class here:

https://github.com/qt-creator/qt-creator/tree/master/src/plugins/coreplugin/dialogs

It is the class SettingsDialog. The GUI is setup in createGUI, they are not using an UI file actually.

This class is using a QListView on the left-hand side and a QStackedLayout with several QTabWidgets inside it on the right-hand side

like image 166
Tim Meyer Avatar answered Sep 27 '22 22:09

Tim Meyer