Frage

I have a QTabWidget with two tabs. I want one to be on the east side and the other one at the top.

I've tried these style sheets, but so far I couldn't get it right.

#tab_basic::top{
}

#tab_advanced::right{
}

or

#tab_basic{
position:top;
}

#tab_advanced{
position:right;
}

or

#tab_basic::top{
}

#tab_advanced::east{
}

or

#tab_basic{
position:top;
}

#tab_advanced{
position:east;
}

Can anyone help me?

War es hilfreich?

Lösung

You can't accomplish this with the QTabWidget as far as I know. What you could do is to create two QTabBar widgets and lay them out the way you want in a QGridLayout. As a center widget you can use a QStackedWidget and depending on which tab that is activated you can control what widget of the QStackedWidget to be visible.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top