The documentation for getText
shows that there are at least three mandatory arguments to that static methods. They are:
- The parent widget (as usual)
- The title of the window
- The label, also known as, the prompt to the user. The text shown inside the dialog window, next to the input line edit.
For example:
report_title = QInputDialog.getText(someWindow, 'New report', 'Report title:')
You can pass plain python strings as QString
, so there's no need to do QString('Modify report')