Seite 1 von 1

Stylesheet macht QTabWidget buggy

Verfasst: 22. März 2010 14:45
von AuE
Folgendes Problem (runtergestrippt):

Man nehme ein QTabWidget und setze diesem das folgende Stylesheet

Code: Alles auswählen

/* make use of negative margins for overlapping tabs */
QTabBar::tab:selected {
/* expand/overlap to the left and right by 4px */
   margin-left:	-3px;
   margin-right: 	-3px;
 }
QTabBar::tab:first:selected {
   margin-left: 0; /* the first selected tab has nothing to overlap with on the left */
}
QTabBar::tab:last:selected {
    margin-right: 0; /* the last selected tab has nothing to overlap with on the right */
 }
 QTabBar::tab:only-one {
     margin: 0; /* if there is only one tab, we don't want overlapping margins *
 }
Ergebnis: Das Tab welches als erstes selektiert war, wird nach einen Tabwechsel völlig falsch dargestellt (links und rechts abgeschnitten und es ist viel kleiner als die anderen.

Was mache ich hier falsch? Oder ist das ein Qt But bzw kann ich es umgehen?

Grüße