I am trying to display a variable with some message in qmessagebox using creator. I found similar post here: pyqt: Variable values in QMessageBox output? but it does not work within the creator. Any suggestions how to amend the code below so that it worked?:
purchaseValue = col2SumUp.sum()
msgbox = QMessageBox(QMessageBox.Information, "Value: %s" % purchaseValue, QMessageBox.Ok)
You are missing the title parameter, the following is working for me:
purchaseValue = 125.2
msgbox = QMessageBox(QMessageBox.Information, "Title", "Value: %s" % purchaseValue, QMessageBox.Ok)
msgbox.exec_()