YACS : how can I display a message ?
At the end of the execution of a YACS scheme, I want to display a message in an window. Is there any component for that ? Or any other idea ?
Perhaps with a Python-Node containing a script like this:
import SalomePyQt
sgPyQt = SalomePyQt.SalomePyQt()
rom PyQt4 import QtGui
parent = sgPyQt.getDesktop()
self = parent
QtGui.QMessageBox.warning(self,
self.tr("Message"),
self.tr("YACS Shema Calculation done!"),
)
Regards,
Richard
I tried your suggestion but nothing was displayed. Error ?
Another suggestion was :
-----------------
import Tkinter
root = Tkinter.Tk()
root.title('Info')
Tkinter.Message(root, text="My message").pack()
root.mainloop()
-----------------
That's correct.
Regards,
Gérald
Hello,
I confirm that this solution cannot work because your script is not is the main thread for Qt used by the desktop of SALOME.
At time, under YACS, it is not possible to run a python script under this main thread.
Regards,
Francis Kloss
Previously Richard S. wrote:
Perhaps with a Python-Node containing a script like this:
import SalomePyQt
sgPyQt = SalomePyQt.SalomePyQt()
rom PyQt4 import QtGui
parent = sgPyQt.getDesktop()
self = parent
QtGui.QMessageBox.warning(self,
self.tr("Message"),
self.tr("YACS Shema Calculation done!"),
)
Regards,
Richard
