Functions

qDrawPlainRect(p, x, y, w, h, lineColor[, lineWidth=1[, fill=None]])
Parameters:
  • pQPainter

  • x – int

  • y – int

  • w – int

  • h – int

  • lineColorQColor

  • lineWidth – int

  • fillQBrush

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

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 None.

Warning

This function does not look at style() or 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 setFrameStyle() function to display a plain rectangle:

QFrame frame:
frame.setFrameStyle(QFrame.Box | QFrame.Plain)
qDrawPlainRect(p, r, lineColor[, lineWidth=1[, fill=None]])
Parameters:

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

This is an overloaded function.

Draws the plain rectangle specified by rect using the given painter, lineColor and lineWidth. The rectangle’s interior is filled with the fill brush unless fill is None.

Warning

This function does not look at style() or 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 setFrameStyle() function to display a plain rectangle:

QFrame frame:
frame.setFrameStyle(QFrame.Box | QFrame.Plain)
qDrawPlainRoundedRect(p, x, y, w, h, rx, ry, lineColor[, lineWidth=1[, fill=None]])
Parameters:
  • pQPainter

  • x – int

  • y – int

  • w – int

  • h – int

  • rx – float

  • ry – float

  • lineColorQColor

  • lineWidth – int

  • fillQBrush

Added in version 6.7.

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

Draws the plain rounded rectangle beginning at (x, y) with the given width and height, using the horizontal rx and vertical radius ry, specified painter, lineColor and lineWidth. The rectangle’s interior is filled with the fill brush unless fill is None.

Warning

This function does not look at style() or 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 setFrameStyle() function to display a plain rectangle:

QFrame frame:
frame.setFrameStyle(QFrame.Box | QFrame.Plain)
qDrawPlainRoundedRect(painter, rect, rx, ry, lineColor[, lineWidth=1[, fill=None]])
Parameters:

Added in version 6.7.

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

This is an overloaded function.

Draws the plain rectangle specified by rect using the horizontal rx and vertical radius ry, the given painter, lineColor and lineWidth. The rectangle’s interior is filled with the fill brush unless fill is None.

Warning

This function does not look at style() or 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 setFrameStyle() function to display a plain rectangle:

QFrame frame:
frame.setFrameStyle(QFrame.Box | QFrame.Plain)
qDrawShadeLine(p, x1, y1, x2, y2, pal[, sunken=true[, lineWidth=1[, midLineWidth=0]]])
Parameters:
  • pQPainter

  • x1 – int

  • y1 – int

  • x2 – int

  • y2 – int

  • palQPalette

  • sunken – bool

  • lineWidth – int

  • midLineWidth – int

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

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 style() or 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 setFrameStyle() function to display a shaded line:

QFrame frame:
frame.setFrameStyle(QFrame.HLine | QFrame.Sunken)
qDrawShadeLine(p, p1, p2, pal[, sunken=true[, lineWidth=1[, midLineWidth=0]]])
Parameters:

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

This is an overloaded function.

Draws a horizontal or vertical shaded line between p1 and p2 using the given painter. Note that nothing is drawn if the line between the points would be 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 style() or 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 setFrameStyle() function to display a shaded line:

QFrame frame:
frame.setFrameStyle(QFrame.HLine | QFrame.Sunken)
qDrawShadePanel(p, r, pal[, sunken=false[, lineWidth=1[, fill=None]]])
Parameters:

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

This is an overloaded function.

Draws the shaded panel at the rectangle specified by rect using the given 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 None.

The panel appears sunken if sunken is true, otherwise raised.

Warning

This function does not look at style() or 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 setFrameStyle() function to display a shaded panel:

QFrame frame:
frame.setFrameStyle( QFrame.Panel | QFrame.Sunken)
qDrawShadePanel(p, x, y, w, h, pal[, sunken=false[, lineWidth=1[, fill=None]]])
Parameters:
  • pQPainter

  • x – int

  • y – int

  • w – int

  • h – int

  • palQPalette

  • sunken – bool

  • lineWidth – int

  • fillQBrush

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

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 None.

The panel appears sunken if sunken is true, otherwise raised.

Warning

This function does not look at style() or 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 setFrameStyle() function to display a shaded panel:

QFrame frame:
frame.setFrameStyle( QFrame.Panel | QFrame.Sunken)
qDrawShadeRect(p, x, y, w, h, pal[, sunken=false[, lineWidth=1[, midLineWidth=0[, fill=None]]]])
Parameters:
  • pQPainter

  • x – int

  • y – int

  • w – int

  • h – int

  • palQPalette

  • sunken – bool

  • lineWidth – int

  • midLineWidth – int

  • fillQBrush

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

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 None.

The rectangle appears sunken if sunken is true, otherwise raised.

Warning

This function does not look at style() or 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 setFrameStyle() function to display a shaded rectangle:

QFrame frame:
frame.setFrameStyle(QFrame.Box | QFrame.Raised)
qDrawShadeRect(p, r, pal[, sunken=false[, lineWidth=1[, midLineWidth=0[, fill=None]]]])
Parameters:

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

This is an overloaded function.

Draws the shaded rectangle specified by rect using the given 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 None.

The rectangle appears sunken if sunken is true, otherwise raised.

Warning

This function does not look at style() or 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 setFrameStyle() function to display a shaded rectangle:

QFrame frame:
frame.setFrameStyle(QFrame.Box | QFrame.Raised)
qDrawWinButton(p, r, pal[, sunken=false[, fill=None]])
Parameters:

This is an overloaded function.

Draws the Windows-style button at the rectangle specified by rect using the given painter with a line width of 2 pixels. The button’s interior is filled with the fill brush unless fill is None.

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 style() or style() -> Use the drawing functions in QStyle to make widgets that follow the current GUI style.

qDrawWinButton(p, x, y, w, h, pal[, sunken=false[, fill=None]])
Parameters:

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 None.

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 style() or style() -> Use the drawing functions in QStyle to make widgets that follow the current GUI style.

qDrawWinPanel(p, r, pal[, sunken=false[, fill=None]])
Parameters:

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

This is an overloaded function.

Draws the Windows-style panel at the rectangle specified by rect using the given painter with a line width of 2 pixels. The button’s interior is filled with the fill brush unless fill is None.

The given palette specifies the shading colors. The panel appears sunken if sunken is true, otherwise raised.

Warning

This function does not look at style() or 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 setFrameStyle() function to display a shaded panel:

QFrame frame:
frame.setFrameStyle(QFrame.WinPanel | QFrame.Raised)
qDrawWinPanel(p, x, y, w, h, pal[, sunken=false[, fill=None]])
Parameters:

Warning

This section contains snippets that were automatically translated from C++ to Python and may contain errors.

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 None.

The given palette specifies the shading colors. The panel appears sunken if sunken is true, otherwise raised.

Warning

This function does not look at style() or 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 setFrameStyle() function to display a shaded panel:

QFrame frame:
frame.setFrameStyle(QFrame.WinPanel | QFrame.Raised)