Google_protectAndRun("render_ads.js::google_render_ad", google_handleError, google_render_ad); google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad); Main Window
The QMainWindow class provides a main application window. This enables to create the classic application skeleton with a statusbar, toolbars and a menubar.
Statusbar
The statusbar is a widget that is used for displaying status information.
To get the statusbar, we call the statusBar() method of the QApplication class. The showMessage() displays message on the statusbar.
Menubar
A menubar is one of the most visible parts of the GUI application. It is a group of commands located in various menus. While in console applications you had to remember all those arcane commands, here we have most of the commands grouped into logical parts. There are accepted standards that further reduce the amount of time spending to learn a new application.
First we create a menubar with the menuBar() method of the QMainWindow class. Then we add a menu with the AddMenu() method. In the end we plug the action object into the file menu.
Toolbar
Menus group all commands that we can use in an application. Toolbars provide a quick access to the most frequently used commands.
GUI applications are controlled with commands. These commands can be launched from a menu, a context menu, a toolbar or with a shortcut. PyQt simplifies development with the introduction of actions. An action object can have menu text, an icon, a shortcut, status text, "What's This?" text and a tooltip. In our example, we define an action object with an icon, a tooltip and a shortcut.