def text_dialog(text, title):
 parent = qtutils.active_window()
 label = QtWidgets.QLabel(parent)
 label.setFont(qtutils.diff_font())
 label.setText(text)
 label.setTextInteractionFlags(Qt.NoTextInteraction)
 widget = QtWidgets.QDialog(parent)
 widget.setWindowModality(Qt.WindowModal)
 widget.setWindowTitle(title)
 layout = qtutils.hbox(defs.margin, defs.spacing, label)
 widget.setLayout(layout)
 qtutils.add_action(widget, N_(u'Close'), widget.accept, Qt.Key_Question, Qt.Key_Enter, Qt.Key_Return)
 widget.show()
 return widget

def text_dialog ( text , title ) : parent = qtutils . active_window ( ) label = QtWidgets . QLabel ( parent ) label . setFont ( qtutils . diff_font ( ) ) label . setText ( text ) label . setTextInteractionFlags ( Qt . NoTextInteraction ) widget = QtWidgets . QDialog ( parent ) widget . setWindowModality ( Qt . WindowModal ) widget . setWindowTitle ( title ) layout = qtutils . hbox ( defs . margin , defs . spacing , label ) widget . setLayout ( layout ) qtutils . add_action ( widget , N_ ( u'Close' ) , widget . accept , Qt . Key_Question , Qt . Key_Enter , Qt . Key_Return ) widget . show ( ) return widget
show a wall of text in a dialog .