QGroupBox title is cut off after modifying it
c.buhtz at posteo.jp
c.buhtz at posteo.jp
Sun Jul 16 15:48:50 BST 2023
Hello,
I tried but I'm not able to create an minimal working example to
reproduce this. So I can only offer you a screenshot to illustrate my
problem. Maybe you have an idea or a hint what could it be or where to
look.
https://i.imgur.com/QpIlbot.png
There is a QGroupBox which title is cutoff at the end. Not sure if
there is a QLabel behind it. But it looks like that the widget did not
expand to the full possible length.
Initially the title was short. After an event/signal the title was
modified with a longer string.
There are much more other widgets and layouts invovled. I assume that
one of them influence the groupbox behavior.
It is initialized like this in the QMainWindow
self.filesWidget = QGroupBox(self)
filesLayout = QVBoxLayout(self.filesWidget)
# ...
self.mainSplitter = QSplitter(Qt.Horizontal, self)
self.mainSplitter.addWidget(self.timeLine)
self.mainSplitter.addWidget(self.filesWidget)
As I stated I'm not able to reproduce in an MWE. My MWE works well.
Everytime I modify the string the groupbox resize itself and display
the whole string.
I'm confused.
Currently I can workaround it with just initializing the title with a
some blank spaces.
Kind
Christian
More information about the PyQt
mailing list