![]() | Home · All Classes · Modules |
The QtGui module extends QtCore with GUI functionality. More...
The QtGui module extends QtCore with GUI functionality.
To import the module use, for example, the following statement:
from PyQt4 import QtGui
Returns the alpha component of the ARGB quadruplet rgba.
See also qRgb() and QColor.alpha().
Returns the blue component of the ARGB quadruplet rgb.
See also qRgb() and QColor.blue().
Draws the plain rectangle beginning at (x, y) with the given width and height, using the specified painter, lineColor and lineWidth. The rectangle's interior is filled with the fill brush unless fill is 0.
Warning: This function does not look at QWidget.style() or QApplication.style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style.
Alternatively you can use a QFrame widget and apply the QFrame.setFrameStyle() function to display a plain rectangle:
QFrame frame: frame.setFrameStyle(QFrame.Box | QFrame.Plain);
See also qDrawShadeRect() and QStyle.
Draws a horizontal (y1 == y2) or vertical (x1 == x2) shaded line using the given painter. Note that nothing is drawn if y1 != y2 and x1 != x2 (i.e. the line is neither horizontal nor vertical).
The provided palette specifies the shading colors (light, dark and middle colors). The given lineWidth specifies the line width for each of the lines; it is not the total line width. The given midLineWidth specifies the width of a middle line drawn in the QPalette.mid() color.
The line appears sunken if sunken is true, otherwise raised.
Warning: This function does not look at QWidget.style() or QApplication.style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style.
Alternatively you can use a QFrame widget and apply the QFrame.setFrameStyle() function to display a shaded line:
QFrame frame: frame.setFrameStyle(QFrame.HLine | QFrame.Sunken);
See also qDrawShadeRect(), qDrawShadePanel(), and QStyle.
Draws the shaded panel beginning at (x, y) with the given width and height using the provided painter and the given lineWidth.
The given palette specifies the shading colors (light, dark and middle colors). The panel's interior is filled with the fill brush unless fill is 0.
The panel appears sunken if sunken is true, otherwise raised.
Warning: This function does not look at QWidget.style() or QApplication.style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style.
Alternatively you can use a QFrame widget and apply the QFrame.setFrameStyle() function to display a shaded panel:
QFrame frame: frame.setFrameStyle( QFrame.Panel | QFrame.Sunken);
See also qDrawWinPanel(), qDrawShadeLine(), qDrawShadeRect(), and QStyle.
Draws the shaded rectangle beginning at (x, y) with the given width and height using the provided painter.
The provide palette specifies the shading colors (light, dark and middle colors. The given lineWidth specifies the line width for each of the lines; it is not the total line width. The midLineWidth specifies the width of a middle line drawn in the QPalette.mid() color. The rectangle's interior is filled with the fill brush unless fill is 0.
The rectangle appears sunken if sunken is true, otherwise raised.
Warning: This function does not look at QWidget.style() or QApplication.style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style.
Alternatively you can use a QFrame widget and apply the QFrame.setFrameStyle() function to display a shaded rectangle:
QFrame frame: frame.setFrameStyle(QFrame.Box | QFrame.Raised);
See also qDrawShadeLine(), qDrawShadePanel(), qDrawPlainRect(), and QStyle.
Draws the Windows-style button specified by the given point (x, y}, width and height using the provided painter with a line width of 2 pixels. The button's interior is filled with the fill brush unless fill is 0.
The given palette specifies the shading colors (light, dark and middle colors).
The button appears sunken if sunken is true, otherwise raised.
Warning: This function does not look at QWidget.style() or QApplication.style()-> Use the drawing functions in QStyle to make widgets that follow the current GUI style.
See also qDrawWinPanel() and QStyle.
Draws the Windows-style panel specified by the given point(x, y), width and height using the provided painter with a line width of 2 pixels. The button's interior is filled with the fill brush unless fill is 0.
The given palette specifies the shading colors. The panel appears sunken if sunken is true, otherwise raised.
Warning: This function does not look at QWidget.style() or QApplication.style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style.
Alternatively you can use a QFrame widget and apply the QFrame.setFrameStyle() function to display a shaded panel:
QFrame frame: frame.setFrameStyle(QFrame.WinPanel | QFrame.Raised);
See also qDrawShadePanel(), qDrawWinButton(), and QStyle.
Returns a gray value (0 to 255) from the (r, g, b) triplet.
The gray value is calculated using the formula (r * 11 + g * 16 + b * 5)/32.
This is an overloaded member function, provided for convenience.
Returns a gray value (0 to 255) from the given ARGB quadruplet rgb.
The gray value is calculated using the formula (R * 11 + G * 16 + B * 5)/32. Note that the alpha-channel is ignored.
Returns the green component of the ARGB quadruplet rgb.
See also qRgb() and QColor.green().
Returns the red component of the ARGB quadruplet rgb.
See also qRgb() and QColor.red().
Returns the ARGB quadruplet (255, r, g, b).
See also qRgba(), qRed(), qGreen(), and qBlue().
Returns the ARGB quadruplet (a, r, g, b).
See also qRgb(), qRed(), qGreen(), and qBlue().
This member should be treated as a constant.
A global pointer referring to the unique application object. It is equivalent to the pointer returned by the QCoreApplication.instance() function except that, in GUI applications, it is a pointer to a QApplication instance.
Only one application object can be created.
See also QCoreApplication.instance().
PyQt 4.3.1 for X11 | Copyright © Riverbank Computing Ltd and Trolltech AS 2007 | Qt 4.3.0 |