Re: Tab labels not shown correctly

Davide Liessi <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <CAOXn3bpZFt0Jv1Xf+5aWJC5dGDCdi81GX0cxccN35bGgdNFEKQ@mail.gmail.com>
Il giorno lun 9 mar 2020 alle ore 13:03 Davide Liessi
<[email protected]> ha scritto:
> I tried both
> win.tabBar.setStyleSheet("padding: 0px 0px 0px 0px")
> and
> mainwindow.setStyleSheet("padding: 0px 0px 0px 0px")
> (and with 1px as well), but there was no difference.

(I'm sorry, I meant mainwidget instead of mainwindow there.)

I found https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtabwidget-and-qtabbar.
I tried the following and they both seemed to work:
win.tabBar.setStyleSheet("QTabBar::tab { padding: 2px }")
mainwidget.setStyleSheet("QTabBar::tab { padding: 2px }")

However, when adding more tabs, only the selected tabs had the correct
size, while the unselected ones were too small, with text bleeding
from the edges.
Moreover, the color changed as well (no blue highlighting of selected
tab anymore).
Any ideas?
_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.