Reputation: 577
While trying to create a status bar for my PySide Application, I recieved an error
self.statusBar().showMessage('Ready')
AttributeError: 'MyApp' object has no attribute 'statusBar'
The code I used was self.statusBar().showMessage('Ready')
in the main class. The app is based on the examples mentioned in this tutorial page. Could someone help me with this?
Thanks in advance.
Upvotes: 0
Views: 541
Reputation: 5326
You're trying to call statusBar()
on your QApplication
, which does not possess such method.
You need to create a QMainWindows
as your main widget, and call statusBar
on it.
Have a look at the PySide documentation of QMainWindow
. You'll find an example of how to use the status bar.
Upvotes: 2