|
|
@ -50,6 +50,10 @@ class Submenu(QtWidgets.QDialog): |
|
|
|
label = QtWidgets.QLabel(labelString) #"Choose a clef" or so. |
|
|
|
self.layout.addWidget(label) |
|
|
|
|
|
|
|
#Second Label that can be changed on every call with self.dynamicLabel.setText() |
|
|
|
self.dynamicLabel = QtWidgets.QLabel("") |
|
|
|
self.layout.addWidget(self.dynamicLabel) |
|
|
|
|
|
|
|
#self.setFocus(); #self.grabKeyboard(); #redundant for a proper modal dialog. Leave here for documentation reasons. |
|
|
|
|
|
|
|
if hasOkCancelButtons == 1: #or true |
|
|
@ -100,7 +104,8 @@ class Submenu(QtWidgets.QDialog): |
|
|
|
self.done(True) |
|
|
|
|
|
|
|
def __call__(self): |
|
|
|
"""This instance can be called like a function""" |
|
|
|
"""This instance can be called like a function. |
|
|
|
Subclasses can subclass this as well to create non-static functionality.""" |
|
|
|
if self.buttonBox: |
|
|
|
self.layout.addWidget(self.buttonBox) |
|
|
|
self.setFixedSize(self.layout.geometry().size()) |
|
|
|