T90
T90

Reputation: 577

Error in creating status bar in PySide

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

Answers (1)

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

Related Questions