Re: Tab labels not shown correctly

Damon Lynch <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <CAFdFio_kKs5cBC-WqfX9tHNN_YXDoDDkRdEZTdtoZKKpVBPE3Q@mail.gmail.com>
On Mon, Mar 9, 2020 at 9:48 AM Davide Liessi <[email protected]>
wrote:

> Il giorno lun 9 mar 2020 alle ore 13:27 Souvik Dutta
> <[email protected]> ha scritto:
> > Did you use the correct selector like you should probably say,
> > self.setStyleSheet(<object name>: disabled{padding: 0px 0px 0px 0px})
>
> I started from the examples in
>
> https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtabwidget-and-qtabbar
> and with the help of
> https://doc.qt.io/qt-5/stylesheet-reference.html
> I arrived at the example below, which reproduces quite well the
> default style on Mac, while also fixing the display of the text in the
> tabs.
>
> Thanks for your help!
> Best wishes.
> Davide
>

While I don't have the message in front of me, I do recall a senior Qt
developer mentioning that while manipulating stylesheets has its uses, they
are seriously limited and can get you into trouble. In short they're a
hack. They might be fine for prototyping, but if you want to do it
properly, you need to learn how Qt styles its widgets and work with its
system. Which is  definitely more difficult. The complexity is real.
Whether it is worth it is up to each developer (I do use stylesheets myself
for some things). It would be nice if the Qt documentation would do a
better job of introducing Qt widget styling and how to get results quickly
and efficiently without stylesheets.

Damon

_______________________________________________
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.