QLabel::setText causes part of widget to disappear
Hi,
While processing a mouse press, among others the contents of the label is set (setText).
In certain application states this causes the parent groupbox to disappear. In other states, setting the text causes the parent groupbox to reappear.
Leaving out the call/connection to setText, everything works as expected.
Any ideas?
Pieter
Re: QLabel::setText causes part of widget to disappear
Could we see the relevant code?
Re: QLabel::setText causes part of widget to disappear
I was affraid of this (logical) reply, as it is quite difficult to isolate. :confused:
The problem has been (partially) solved, by replacing in code changes to the form (which is designed in Qt Designer), to using custom widgets via the promotion mechanism.
The groupbox does no longer hide an show alternately, but it height changes alternately from very small to appropriate. In the same groupbox, a Q3ListView subclass is used, maybe using Qt4 and Qt3 support gives rise to the strange behavior?
Re: QLabel::setText causes part of widget to disappear
An off the cuff guess of where to look would be in the layout management for the frames/widgets involved. All it takes is one missing layout or a mis-applied sisePolicy on a widget to get behavior like you are describing.
Re: QLabel::setText causes part of widget to disappear
Rebuilding the design from scratch resolved the problem. Probably indeed a missing/inappropriate layout.