Reputation: 6204
In My App, I have a QWidget which is not showing after I call show()
, even though isVisible
returns true
.
This widget is created from an event of the main application window. But when its started on its own, i.e., as the only widget on an app, it shows up normally.
Anyone knows what may cause this behavior?
Other widgets in my app show up normally only this one is giving me troubles. It actually use to work just fine under a previous version of Qt4 (don't remember which).
the code for the widget is here
update: windows seems to appear and is immediately destroyed.
Upvotes: 2
Views: 3192
Reputation: 120598
The relevant code is in hidx/GUI/main.py
:
@pyqtSignature("")
def on_actionScatterplot_Matrix_activated(self):
...
spm = scatmat.ScatMat(pars, self.currentdbname)
print "==>", spm.pw.isVisible()
spm.pw.hide()
spm.pw.showMaximized()
print spm.pw.size()
print "==>", spm.pw.isVisible()
@pyqtSignature("int")
def on_rowStart_valueChanged(self, p0):
...
In on_actionScatterplot_Matrix_activated
, you create an instance of ScatMat
, but don't keep a reference to it. So the window will be briefly shown, and then immediately garbage-collected once the function completes.
Upvotes: 4