[solved] Transform QTabBar into QComboBox in QTabWidget
-
Hi all,
I'm facing this problem and I don't find answer on the various threads.
This is my project:
I have an editor box, and I want to split it many times in the main window, each splitter having his own TabBar/ComboBox. What I have done is to create a QTabWidget in each splitter. This is actually working very well.Now, I would like to have a ComboBox instead of TabBar. Is there any way to make this?
Luca
-
Hi and welcome to devnet,
Rather than trying to modify QTabWidget why not create your own "stacked widget" using a QComboBox and QStackedWidget ?
-
Yes, you are right.
Actually I didn't understood very well how "classes" are useful. Now I have done it with my supervisor, and he taught me that a new class can contain a TabBar/ComboBox and the StackedWidget associated to it.Any way, I think that a setBarMode(TabBar/ComboBox) would be useful in next releases of Qt.
Thank you for the help :)
Luca -
You're welcome !
setBarMode wouldn't make any sense here. The widget name is pretty self explanatory.
Since you have it all working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)