[Interest] Qt Designer zombie widget phenomenon

Bernhard Lindner private at bernhard-lindner.de
Thu Dec 3 19:19:25 CET 2020


Thanks, Roland, for the interesting answer!

I wasn't using Designer much recently. But as soon as that happens again, I will check
what you described. 

I used layouts a lot and yes, some of them orginate from Qt4. But I am not sure how many.
I started using Qt5 a long time ago. Hard to say if this actually happens for Qt4 UIs
only.

I guess there is no way to grep such hidden layouts?

Is there, by any chance, a Designer developer wo maybe knows more details?

> During early Qt 4.x days, this and corrupted .ui files that had to be 
> hand edited using a basic editor were common problems. Recently I had to 
> crack open some .ui files created during the 4.x days using the 4.x era 
> Designer. I had this _exact_ problem crop up using the QtCreator bundled 
> in both Ubuntu 18.04 LTS (base for your KDE Neon version) and the one in 
> Ubuntu 20.04 LTS.
> 
> I didn't dig horribly deep into the problem given everything else life 
> was tossing at me, but I did open the .ui files BlueFish 
> http://bluefish.openoffice.nl/index.html and a couple of other editors. 
> When I searched for the object names the Designer gave me for the Zombie 
> objects I found they were all inside a "hidden" layout. Even things that 
> I had just deleted were there.
> 
> This problem did not manifest itself in any .ui files I created from 
> scratch, only in those that had originally been created using 4.x era tools.
> 
> If you still have the original files and have in your notes (or can 
> simply reproduce the problem) you should obtain the name of the 
> object(s) then open the .ui in an XML highlighting editor and search for 
> them. I suspect you will find them in a "hidden" layout. What I remember 
> from the experience is it seemed like deleted objects were "stored for 
> safe keeping" in a "deleted" layout in case you wanted to restore them. 
> Again, this only happened in .ui files that had been created with 4.x 
> era tools. Even when I used the new tools they seemed to put anything I 
> deleted in that layout for safe keeping. I guess in case I wanted to 
> undelete it?
> 
> The Zombie effect has to do with the mysteries of layout sizing and 
> visibility calculations. It is decided for you that some little piece of 
> that layout is now "visible" and the object contained in that area appears.
> 
> Being quite busy and seeing there were no need for layouts in these 
> dialogs anyway (it was fixed size having no max/min buttons) I nuked 
> every layout. One did need the min/max buttons. I recreated the .ui from 
> scratch and there were no mystery objects revealed in the XML editors.
> 
> On 9/6/20 5:00 AM, Bernhard Lindner wrote:
> > Hi!
> > 
> > Ok, that is kind of crazy and ridiculous. And maybe it is something stupid I am doing.
> > But
> > I can't figure it out. It suddenly started many months ago after some Qt Creator
> > update
> > and at the beginning I simply ignored it. But now it is driving me nuts.
> > 
> > This is what happens:
> > I open a window UI in Qt Creator Designer, I change something random like a text and I
> > save the changed design. Then I close the designer and build the application. After
> > starting the application, sometimes a new, completely random widget (e.g. a QComboBox)
> > appears somewhere embedded in a new random layout cell in my window. That widget is
> > blank
> > and everything else in the window is unchanged. If this happens I can go back to the
> > designer and simply delete the additional "zombie widget". Then everything is back to
> > normal after building the application... until I edit a design and with a small chance
> > some other zombie widget pops up from nowhere. The zombie widget is not visible when
> > editing/saving/closing the design, only after reloading it from disk.
> > 
> > I could not find a system when or why this happens. I don't think it is an unwanted
> > drag-
> > n-drop action.
> > 
> > I am using KDE Neon 18.04 and the most recent Qt Creator with Qt 5.14.2.
> > 
> > Has this happend to someone else before?
> > 

-- 
Gruß, Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20201203/2272a799/attachment.sig>


More information about the Interest mailing list