How to output things in the statusBar bar

More
05 Nov 2021 05:59 #225359 by yi2580
Hello everyone, I want to control the status bar or warning pop-up window and output some things. How should I do it? Who can guide me? Thank you
Attachments:

Please Log in or Create an account to join the conversation.

More
05 Nov 2021 06:04 #225361 by yi2580
I tried to output this way, but he reported an error to me. I don't know what to do. I may not know much about pyqt before
Attachments:

Please Log in or Create an account to join the conversation.

More
05 Nov 2021 17:25 #225415 by cmorley
Depends what it's called in designer, but roughly this for the status bar:

self.w.statusbar.showMessage(message, timeout * 1000)

STATUS.emit('error', linuxcnc.OPERATOR_ERROR, 'message')

in master also:
ACTION.SET_DISPLAY_MESSAGE('MESSAGE')
ACTION.SET_ERROR_MESSAGE('MESSAGE')

Please Log in or Create an account to join the conversation.

More
08 Nov 2021 07:24 #225636 by yi2580
I didn't add a status bar in my designer, and I don't know its name, but when I started it, the status bar existed. I don't know how to use the status bar, because I also want to output something in the status bar. I hope you can help me solve it. Thank you for your help

Please Log in or Create an account to join the conversation.

More
08 Nov 2021 08:31 #225637 by cmorley
it you start with a mainWindow, statusbar is added automatically and is called stausbar

try:

self.w.statusbar.showMessage('My message', 8000)

Please Log in or Create an account to join the conversation.

More
09 Nov 2021 00:52 #225743 by yi2580
OK, thank you very much. I tried your method. Now I can output something on the status bar.
Thank you again
The following user(s) said Thank You: cmorley

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.162 seconds
Powered by Kunena Forum