blackberry/Qt — Issue #3: Dialogs are not visible if parented to other dialogs
Author: dkonigsberg
Created: 2011-11-06 21:54:08+00:00
State: open

I hope this description makes sense. The app's main window is a QMainWindow, which launches various QDialogs. Those display fine. But if they launch other QDialogs (e.g. dialog has a pop-up item-picker window), those sub-QDialogs are invisible and inaccessible. Even worse, if they're modal, they completely lock up the app's UI.

I did some investigation, and these sub-QDialogs are being correctly created. However, I suspect that the problem is that their Z-order is not being set. When checking debug logs, it appears that the last call to QBBScreen::updateHierarchy() occurs *before* the sub-QDialog is created.

I did find a fix, and while I'm not sure if its the right fix, it appears to work. At the very bottom of the QBBWindow constructor (right after the call to addWindow(this)), I added a call to QBBScreen::updateHierarchy() and the problem went away.