O'Reilly logo

Qt 5 Blueprints by Symeon Huang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying errors on the status bar

First of all, there could be errors during the whole camera process and it's a good practice to make the user aware of what the error is. It can be done by a pop-up dialog and/or status bar. You don't want to alert the user to every trivial error. Therefore, it'd be better to use a pop-up dialog only for critical errors, while displaying non-critical errors and warnings on the status bar.

Qt began supporting the status bar a long time ago. The QStatusBar class is the one that provides a horizontal bar suitable for presenting status information. The status of the camera can be displayed as well and it'll be introduced in later topics.

To use the status bar, edit mainwindow.ui, right-click on MainWindow, and select ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required