문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top