0
我需要的是非常相似的QtMessageBox.information方法,但我需要它构成我的自定义窗口。PyQt4:将QtMessageBox.information功能添加到自定义窗口中
我需要一个标签很少的窗口,一个QtTreeViewWidget,一个QButtonGroup ...这个窗口将从主窗口调用。如果我们调用类,它实现所谓的窗口SelectionWindow,比我需要的是:从SelectionWindow
class MainWindow(QtGui.QMainWindow):
...
def method2(self):
selWin = SelectionWindow()
tempSelectionValue = selWin.getSelection()
# Blocked until return from getSelection
self.method1(tempSelectionValue)
...
class SelectionWindow(QtGui.QMainWindow):
...
def getSelection(self):
...
return selectedRow
...
方法getSelection应该弹出选择窗口,在QTreeViewWidget选择的末端返回一行。我希望主窗口保持阻塞状态,直到用户在选择窗口中选择一行并通过按钮确认。我希望你能明白我需要什么。
我会感谢任何帮助!
感谢, Tiho
redShadow,非常感谢你的回答。最后,我做了一些与您的提案非常相似的内容。 – Tiho 2010-03-09 09:33:56