QTabWidget: first tab's text not displaying
Maurizio Berti
maurizio.berti at gmail.com
Sat May 1 05:39:26 BST 2021
Il giorno sab 1 mag 2021 alle ore 02:44 Rich Shepard <
rshepard at appl-ecosys.com> ha scritto:
> Aha! I hadn't clicked on other tabs, but the current one is blank.
>
Ok, at least it's consistent.
> If you allow moving tabs (btw, movable tabs are disabled by default, so
> > there's no need for that line), does the title appear in the drag object?
> I don't allow moving tabs and the title remains on the frame when I move it
> (I run Slackware64-14.2 with Xfce4 and its default wm and PyQt-5.13.2).
>
Sorry, I don't understand. If you *do* allow movable tabs, do you see the
title on the dragged tab while moving?
> The title is there (if you use very high contrast on very low lightness
> > you'll see it), but considering the overall look I'm inclined to think
> > that's a specific platform/style issue (the ugly font might be a hint).
>
> This may be the case. I've not yet specified fonts or colors and when I do
> so this issue might be resolved
>
There might be some inconsistency with the default XFCE font/palette. It's
possible that Qt relies on the current system palette and the
current+focused+active gets a color that's too bright.
Can you try with the following?
tabs.setStyleSheet('''
QTabBar::tab:selected {
color: black;
}
''')
> > What is the output of QApplication.style().objectName()?
>
> From where do I run this?
>
>From anywhere, as long as a QApplication instance has been created, since
style() is a static method (so, just after creating it or even in any
widget __init__).
Maurizio
--
È difficile avere una convinzione precisa quando si parla delle ragioni del
cuore. - "Sostiene Pereira", Antonio Tabucchi
http://www.jidesk.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210501/98232a69/attachment.htm>
More information about the PyQt
mailing list