[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: QTabWidget: first tab's text not displaying
From:       Maurizio Berti <maurizio.berti () gmail ! com>
Date:       2021-04-30 23:02:38
Message-ID: CAPn+-XQKLC=nsYJaRmY7H-J4Dt27wOuCqARR92TzUuHf6mimNQ () mail ! gmail ! com
[Download RAW message or body]

There's something wrong there, and the font doesn't seem to be antialiased.
Does that happen only for the first tab, or for the current tab?
Have you tried with an *actual* completely minimal code (just one or two
tabs with only a QWidget as their pages)?
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?
Are you using some generic stylesheet (with the "*" universal selector or
without any selector at all) applied on the application or parent window?

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).
Can you provide more information about Linux distribution, window manager,
PyQt version, etc.?
What is the output of QApplication.style().objectName()?

Il giorno ven 30 apr 2021 alle ore 23:12 Rich Shepard <
rshepard@appl-ecosys.com> ha scritto:

> The attached screenshot shows all 8 tabs, but the identifying text on the
> first one is missing and I don't see why that tab is different.
>
> Here's the relevant code:
>
> from views.locations import SitesWindow
> from views.geochem import GeochemWindow
> from views.biota import BiotaWindow
> from views.physical import PhysicalWindow
> from views.microbes import MicrobesWindow
> from views.wx_data import WxDataWindow
> from views.wx_locations import WxSitesWindow
> from views.wx_params import WxParamsWindow
>
> class MainWindow(qtw.QMainWindow):
>      def __init__(self):
>          """MainWindow constructor"""
>          super().__init__()
>
>          self.setWindowTitle('OpenEDMS')
>          self.statusBar()
>          self.setFixedSize(800, 600)
>
>          # tab contents
>          self.loc = SitesWindow()
>          self.che = GeochemWindow()
>          self.bio = BiotaWindow()
>          self.phy = PhysicalWindow()
>          self.mic = MicrobesWindow()
>          self.wxd = WxDataWindow()
>          self.wxp = WxParamsWindow()
>          self.wxl = WxSitesWindow()
>
>          tabs = qtw.QTabWidget()
>          tabs.setMovable(False)
>          self.setCentralWidget(tabs)
>          # add tab pages here
>          tabs.addTab(self.loc, 'Sites')
>          tabs.addTab(self.che, 'Chemicals')
>          tabs.addTab(self.bio, 'Biota')
>          tabs.addTab(self.phy, 'Physical')
>          tabs.addTab(self.mic, 'Microbes')
>          tabs.addTab(self.wxp, 'WX Data')
>          tabs.addTab(self.wxl, 'WX Params')
>          tabs.addTab(self.wxd, 'WX Sites')
>
>          self.show()
>
> All eight look the same to me, but 'Sites' is not displayed on the first
> tab. What have I missed here?
>
> TIA,
>
> Rich



-- 
È difficile avere una convinzione precisa quando si parla delle ragioni del
cuore. - "Sostiene Pereira", Antonio Tabucchi
http://www.jidesk.net

[Attachment #3 (text/html)]

<div dir="ltr">There&#39;s something wrong there, and the font doesn&#39;t seem to be \
antialiased.<div>Does that happen only for the first tab, or for the current \
tab?</div><div>Have you tried with an *actual* completely minimal code (just one or \
two tabs with only a QWidget as their pages)?</div><div>If you allow moving tabs \
(btw, movable tabs are disabled by default, so there&#39;s no need for that line), \
does the title appear in the drag object?</div><div>Are you using some generic \
stylesheet (with the &quot;*&quot; universal selector or without any selector at all) \
applied on the application or parent window?</div><div><div><br></div><div>The title \
is there (if you use very high contrast on very low lightness you&#39;ll see it), but \
considering the overall look I&#39;m inclined to think that&#39;s a specific \
platform/style issue (the ugly font might be a hint).</div><div>Can you provide more \
information about Linux distribution, window manager, PyQt version, etc.?<br>What is \
the output of QApplication.style().objectName()?</div><div></div></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 30 apr 2021 alle \
ore 23:12 Rich Shepard &lt;<a \
href="mailto:rshepard@appl-ecosys.com">rshepard@appl-ecosys.com</a>&gt; ha \
scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The attached \
screenshot shows all 8 tabs, but the identifying text on the<br> first one is missing \
and I don&#39;t see why that tab is different.<br> <br>
Here&#39;s the relevant code:<br>
<br>
from views.locations import SitesWindow<br>
from views.geochem import GeochemWindow<br>
from views.biota import BiotaWindow<br>
from views.physical import PhysicalWindow<br>
from views.microbes import MicrobesWindow<br>
from views.wx_data import WxDataWindow<br>
from views.wx_locations import WxSitesWindow<br>
from views.wx_params import WxParamsWindow<br>
<br>
class MainWindow(qtw.QMainWindow):<br>
        def __init__(self):<br>
              &quot;&quot;&quot;MainWindow constructor&quot;&quot;&quot;<br>
              super().__init__()<br>
<br>
              self.setWindowTitle(&#39;OpenEDMS&#39;)<br>
              self.statusBar()<br>
              self.setFixedSize(800, 600)<br>
<br>
              # tab contents<br>
              self.loc = SitesWindow()<br>
              self.che = GeochemWindow()<br>
              self.bio = BiotaWindow()<br>
              self.phy = PhysicalWindow()<br>
              self.mic = MicrobesWindow()<br>
              self.wxd = WxDataWindow()<br>
              self.wxp = WxParamsWindow()<br>
              self.wxl = WxSitesWindow()<br>
<br>
              tabs = qtw.QTabWidget()<br>
              tabs.setMovable(False)<br>
              self.setCentralWidget(tabs)<br>
              # add tab pages here<br>
              tabs.addTab(self.loc, &#39;Sites&#39;)<br>
              tabs.addTab(self.che, &#39;Chemicals&#39;)<br>
              tabs.addTab(self.bio, &#39;Biota&#39;)<br>
              tabs.addTab(self.phy, &#39;Physical&#39;)<br>
              tabs.addTab(self.mic, &#39;Microbes&#39;)<br>
              tabs.addTab(self.wxp, &#39;WX Data&#39;)<br>
              tabs.addTab(self.wxl, &#39;WX Params&#39;)<br>
              tabs.addTab(self.wxd, &#39;WX Sites&#39;)<br>
<br>
              self.show()<br>
<br>
All eight look the same to me, but &#39;Sites&#39; is not displayed on the first<br>
tab. What have I missed here?<br>
<br>
TIA,<br>
<br>
Rich</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" \
class="gmail_signature">È difficile avere una convinzione precisa quando si parla \
delle ragioni del cuore. - &quot;Sostiene Pereira&quot;, Antonio Tabucchi<br><a \
href="http://www.jidesk.net" target="_blank">http://www.jidesk.net</a></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic