Re: Tab labels not shown correctly
Souvik Dutta Chowdhury <[email protected]>
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <TY2PR0101MB3232F6C40A145CAC5EAE6820F2FE0@TY2PR0101MB3232.apcprd01.prod.exchangelabs.com> |
Ya seriously, and more so with the pyqt5 documentation made by riverbank. They should learn from python. Get Outlook for Android<https://aka.ms/ghei36> ________________________________ From: PyQt <[email protected]> on behalf of Damon Lynch <[email protected]> Sent: Monday, March 9, 2020 7:30:51 PM To: Davide Liessi <[email protected]> Cc: [email protected] <[email protected]> Subject: Re: [PyQt] Tab labels not shown correctly On Mon, Mar 9, 2020 at 9:48 AM Davide Liessi <[email protected]<mailto:[email protected]>> wrote: Il giorno lun 9 mar 2020 alle ore 13:27 Souvik Dutta <[email protected]<mailto:[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