You have two choices: use a QLabel or a QLineEdit (with editing disabled: QLineEdit::setReadOnly()). It depends on how you want the output to appear. If you use a standard QLabel, it will look like plain old text on the background of your main UI widget. If you use QLineEdit, it will look like an edit box (with a frame around the text).I'm not sure which widget to select for my display.
In either case, you should user QString::number() to format the text the way you want it to appear, then use the appropriate setText() call to display it in the result widget.
The translation from C++ syntax to Python syntax is straightforwward.




Reply With Quote
Bookmarks