python - PyQt4 Custom dialog not showing -
I am working with PyQt4 to create a simple Python GUI app.
The situation is low:
I have a QMainWindow
displaying a custom widget and it displays a curved content with custom widgets:
I want to display this custom dialog class basically when addButton is clicked:
But this does not work, I do not use the addTag method to change it to a dialog inline Is able to create:
def addTag (self): dialog = QDialog () dialog.show ()
But I am satisfied with inline communication creation I'm not. What's my error Thank you.
Edit
The problem was with the creator of the custom dialogue class:
class AddTagDlg (QDialog): Def __init __ (self, parent = none): super (AddTagDlg, self) .__ init __ (parent) # & lt; - Lost button box = QDialogButtonBox (QDialogButtonBox.Ok | QDialogButtonBox.Cancel) ...
< Try calling call
exec_ ()
on p> dialog, this should show you the dialog.
Comments
Post a Comment