Tooltips not showing after combo box content is updated dynamically
-
On Linux Ubuntu 22.04, desktop app built with Qt 5.15.5, I have a dialog with many widgets including a combo box which is initially empty. I have tooltips for most of these widgets which are generated dynamically since they contain HTML text, and in order to ease translation of these, I do not set them in Qt Designer (which I use to design the dialog), but only at runtime when the dialog is constructed. If the user changes languages, the tooltips are also regenerated.
The combo box displays a list of HTML files for a given directory which can be browsed by the user. When the dialog opens and the combo box is empty, all of the tooltips are shown correctly.
After browsing for a directory and choosing a file, none of the tooltips show any more.
Is this a known bug? I couldn't find anything about it.
-
UPDATE: I had called
"QComboBox::showPopup()"after loading the file names; when I commented this out, the tooltips show up normally. -
UPDATE 2: If I do call
"QComboBox::showPopup()", after selecting the first item, the tooltips don't show.If I select a second item, the tooltips reappear normally.
This looks like a bug related to the
"QComboBox::showPopup()"function? -
UPDATE 3: This doesn't happen if I build with Qt 6.4.3.
-
UPDATE 4: If I build with Qt 5.15.5 and run the app with the Xorg platform, the bug does not happen.
It must be Wayland related, since previously I had been using the Ubuntu default desktop (which is Wayland).
I am marking this as SOLVED for now, but I will probably file a bug report.
-
R Robert Hairgrove has marked this topic as solved on