def word_dialog(self, msg):
    dialog = WindowModalDialog(self.top_level_window(), '')
    hbox = QHBoxLayout(dialog)
    hbox.addWidget(QLabel(msg))
    text = QLineEdit()
    text.setMaximumWidth(100)
    text.returnPressed.connect(dialog.accept)
    hbox.addWidget(text)
    hbox.addStretch(1)
    dialog.exec_()
    self.word = text.text()
    self.done.set()
def word_dialog(self, msg):
    dialog = WindowModalDialog(self.top_level_window(), )
    hbox = QHBoxLayout(dialog)
    hbox.addWidget(QLabel(msg))
    text = QLineEdit()
    text.setMaximumWidth(100)
    text.returnPressed.connect(dialog.accept)
    hbox.addWidget(text)
    hbox.addStretch(1)
    dialog.exec_()
    self.word = text.text()
    self.done.set()