Display a message in PyQt4

I am developing an application using PyQt4.

Currently, I need a message box, that is, if I am on the current screen and the user clicks on a function, the callback function should display the message, either in the message box or in any other way that you can offer .... .. However, when the user cancels this, the stream must go to the current screen.

Please, help....

Thank you so much.

+3
source share
1 answer

If I understand your question, I consider your scenario to be common.

To show a message, the easiest way:

my_msg = "Hello world"
QtGui.QMessageBox.information(None, 'My Title', my_msg)

This code must be included in the callback function.

+3
source

Source: https://habr.com/ru/post/1784778/


All Articles