Search code examples
c++qtcross-platformsidebarqtabwidget

QTabWidget tabs on the vertical, but text in horizontal


I'm trying to make an app in C++ Qt with a sidebar like this one:

Finder's sidebar

But when making QTabWidget's orientation to West, it makes the text vertical. How to have the text on the left, but horizontally-aligned? Ps: I don't need icons. Thanks in advance.


Solution

  • You can use QListWidget to show the "tabs" (with some mods to make it look like you want) and QStackedWidget to handle switching between pages like normal tab widget does.