PDA

View Full Version : Using QTabBar as QTabWidget replacement



invictus
16th August 2008, 02:57
Hi

I have been using QTabWidget for a tabbed main window application, but I have decided to try changing from "one widget per tab" to one single shared widget for all tabs. The way I can achieve this is, as far as I know, to use a QTabBar instead of the QTabWidget. Unfortunately, by adding a QTabBar at the top (using a QVBoxLayout) and the single widget (in my case a QTextEdit for now), it looks really bad. Is there any way I can get the looks/layout of the QTabWidget solution without needing to add a new QTextEdit for each of the tabs?

What I mean is to make the QTextEdit be placed within a frame/panel that looks like it belongs to the current tab

Thanks :)