摘要:
The most universal layout class is the grid layout. This layout divides the space into rows and columns. To create a grid layout, we use theQtGui.QGri... 阅读全文
摘要:
Layout management with layout classes is much more flexible and practical. It is the preferred way to place widgets on a window. TheQtGui.QHBoxLayouta... 阅读全文
摘要:
The programmer specifies the position and the size of each widget in pixels. When you use absolute positioning, we have to understand the following li... 阅读全文
摘要:
In the last example of this section, we create a menubar, a toolbar and a statusbar. We also create a central widget.#!/usr/bin/python# -*- coding: ut... 阅读全文
摘要:
Menus group all commands that we can use in an application. Toolbars provide a quick access to the most frequently used commands.#!/usr/bin/python# -*... 阅读全文
摘要:
A menubar is a common part of a GUI application. It is a group of commands located in various menus.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode... 阅读全文
摘要:
Main windowTheQtGui.QMainWindowclass provides a main application window. This enables to create a classic application skeleton with a statusbar, toolb... 阅读全文
摘要:
The following script shows how we can center a window on the desktop screen.#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode PyQt4 tutorial This pro... 阅读全文
摘要:
By default, if we click on the x button on the titlebar, theQtGui.QWidgetis closed. Sometimes we want to modify this default behaviour. For example, i... 阅读全文
摘要:
The obvious way to how to close a window is to click on the x mark on the titlebar. In the next example, we will show how we can programatically close... 阅读全文