- Posts: 161
- Thank you received: 0
How to output things in the statusBar bar
4 years 11 months ago #225359
by yi2580
How to output things in the statusBar bar was created 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
Attachment not found
Attachment not found
Please Log in to join the conversation.
4 years 11 months ago #225361
by yi2580
Replied by yi2580 on topic How to output things in the statusBar bar
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
Attachment not found
Please Log in to join the conversation.
4 years 11 months ago #225415
by cmorley
Replied by cmorley on topic How to output things in the statusBar bar
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')
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 to join the conversation.
4 years 11 months ago #225636
by yi2580
Replied by yi2580 on topic How to output things in the statusBar bar
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 to join the conversation.
4 years 11 months ago #225637
by cmorley
Replied by cmorley on topic How to output things in the statusBar bar
it you start with a mainWindow, statusbar is added automatically and is called stausbar
try:
self.w.statusbar.showMessage('My message', 8000)
try:
self.w.statusbar.showMessage('My message', 8000)
Please Log in to join the conversation.
4 years 11 months ago #225743
by yi2580
Replied by yi2580 on topic How to output things in the statusBar bar
OK, thank you very much. I tried your method. Now I can output something on the status bar.
Thank you again
Thank you again
Please Log in to join the conversation.
Time to create page: 0.607 seconds
