<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- qdrawutil.cpp --> <head> <title>Qt 4.6: <qdrawutil.h> - Drawing Utility Functions</title> <link href="classic.css" rel="stylesheet" type="text/css" /> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td> <td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="functions.html"><font color="#004faf">All Functions</font></a> · <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title"><qdrawutil.h> - Drawing Utility Functions<br /><span class="subtitle"></span> </h1> <ul> </ul> <a name="Functionsx"></a> <h2>Functions</h2> <table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawBorderPixmap">qDrawBorderPixmap</a></b> ( QPainter * <i>painter</i>, const QRect & <i>target</i>, const QMargins & <i>margins</i>, const QPixmap & <i>pixmap</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawPlainRect">qDrawPlainRect</a></b> ( QPainter * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const QColor & <i>lineColor</i>, int <i>lineWidth</i> = 1, const QBrush * <i>fill</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawPlainRect-2">qDrawPlainRect</a></b> ( QPainter * <i>painter</i>, const QRect & <i>rect</i>, const QColor & <i>lineColor</i>, int <i>lineWidth</i> = 1, const QBrush * <i>fill</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawShadeLine">qDrawShadeLine</a></b> ( QPainter * <i>painter</i>, int <i>x1</i>, int <i>y1</i>, int <i>x2</i>, int <i>y2</i>, const QPalette & <i>palette</i>, bool <i>sunken</i> = true, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawShadeLine-2">qDrawShadeLine</a></b> ( QPainter * <i>painter</i>, const QPoint & <i>p1</i>, const QPoint & <i>p2</i>, const QPalette & <i>palette</i>, bool <i>sunken</i> = true, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a></b> ( QPainter * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const QPalette & <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, const QBrush * <i>fill</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawShadePanel-2">qDrawShadePanel</a></b> ( QPainter * <i>painter</i>, const QRect & <i>rect</i>, const QPalette & <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, const QBrush * <i>fill</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a></b> ( QPainter * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const QPalette & <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0, const QBrush * <i>fill</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawShadeRect-2">qDrawShadeRect</a></b> ( QPainter * <i>painter</i>, const QRect & <i>rect</i>, const QPalette & <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0, const QBrush * <i>fill</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawWinButton">qDrawWinButton</a></b> ( QPainter * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const QPalette & <i>palette</i>, bool <i>sunken</i> = false, const QBrush * <i>fill</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawWinButton-2">qDrawWinButton</a></b> ( QPainter * <i>painter</i>, const QRect & <i>rect</i>, const QPalette & <i>palette</i>, bool <i>sunken</i> = false, const QBrush * <i>fill</i> = 0 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a></b> ( QPainter * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const QPalette & <i>palette</i>, bool <i>sunken</i> = false, const QBrush * <i>fill</i> = 0 )</td></tr> </table> <p>See also <a href="qpainter.html">QPainter</a>.</p> <hr /> <h2>Function Documentation</h2> <a name="//apple_ref/cpp/func//qDrawBorderPixmap"></a> <h3 class="fn"><a name="qDrawBorderPixmap"></a>void qDrawBorderPixmap ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qrect.html">QRect</a> & <i>target</i>, const <a href="qmargins.html">QMargins</a> & <i>margins</i>, const <a href="qpixmap.html">QPixmap</a> & <i>pixmap</i> )</h3> <p>This is an overloaded function.</p> <p>The qDrawBorderPixmap function is for drawing a pixmap into the margins of a rectangle.</p> <p>Draws the given <i>pixmap</i> into the given <i>target</i> rectangle, using the given <i>painter</i>. The pixmap will be split into nine segments and drawn according to the <i>margins</i> structure.</p> <p>This function was introduced in Qt 4.6.</p> <a name="//apple_ref/cpp/func//qDrawPlainRect"></a> <h3 class="fn"><a name="qDrawPlainRect"></a>void qDrawPlainRect ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const <a href="qcolor.html">QColor</a> & <i>lineColor</i>, int <i>lineWidth</i> = 1, const <a href="qbrush.html">QBrush</a> * <i>fill</i> = 0 )</h3> <p>Draws the plain rectangle beginning at (<i>x</i>, <i>y</i>) with the given <i>width</i> and <i>height</i>, using the specified <i>painter</i>, <i>lineColor</i> and <i>lineWidth</i>. The rectangle's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p> <p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p> <p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a plain rectangle:</p> <pre> QFrame frame: frame.setFrameStyle(QFrame::Box | QFrame::Plain);</pre> <p>See also <a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>() and <a href="qstyle.html">QStyle</a>.</p> <h3 class="fn"><a name="qDrawPlainRect-2"></a>void qDrawPlainRect ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qrect.html">QRect</a> & <i>rect</i>, const <a href="qcolor.html">QColor</a> & <i>lineColor</i>, int <i>lineWidth</i> = 1, const <a href="qbrush.html">QBrush</a> * <i>fill</i> = 0 )</h3> <p>This is an overloaded function.</p> <p>Draws the plain rectangle specified by <i>rect</i> using the given <i>painter</i>, <i>lineColor</i> and <i>lineWidth</i>. The rectangle's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p> <p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p> <p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a plain rectangle:</p> <pre> QFrame frame: frame.setFrameStyle(QFrame::Box | QFrame::Plain);</pre> <p>See also <a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>() and <a href="qstyle.html">QStyle</a>.</p> <a name="//apple_ref/cpp/func//qDrawShadeLine"></a> <h3 class="fn"><a name="qDrawShadeLine"></a>void qDrawShadeLine ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, int <i>x1</i>, int <i>y1</i>, int <i>x2</i>, int <i>y2</i>, const <a href="qpalette.html">QPalette</a> & <i>palette</i>, bool <i>sunken</i> = true, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0 )</h3> <p>Draws a horizontal (<i>y1</i> == <i>y2</i>) or vertical (<i>x1</i> == <i>x2</i>) shaded line using the given <i>painter</i>. Note that nothing is drawn if <i>y1</i> != <i>y2</i> and <i>x1</i> != <i>x2</i> (i.e. the line is neither horizontal nor vertical).</p> <p>The provided <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors). The given <i>lineWidth</i> specifies the line width for each of the lines; it is not the total line width. The given <i>midLineWidth</i> specifies the width of a middle line drawn in the <a href="qpalette.html#mid">QPalette::mid</a>() color.</p> <p>The line appears sunken if <i>sunken</i> is true, otherwise raised.</p> <p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p> <p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded line:</p> <pre> QFrame frame: frame.setFrameStyle(QFrame::HLine | QFrame::Sunken);</pre> <p>See also <a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>(), <a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a>(), and <a href="qstyle.html">QStyle</a>.</p> <h3 class="fn"><a name="qDrawShadeLine-2"></a>void qDrawShadeLine ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qpoint.html">QPoint</a> & <i>p1</i>, const <a href="qpoint.html">QPoint</a> & <i>p2</i>, const <a href="qpalette.html">QPalette</a> & <i>palette</i>, bool <i>sunken</i> = true, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0 )</h3> <p>This is an overloaded function.</p> <p>Draws a horizontal or vertical shaded line between <i>p1</i> and <i>p2</i> using the given <i>painter</i>. Note that nothing is drawn if the line between the points would be neither horizontal nor vertical.</p> <p>The provided <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors). The given <i>lineWidth</i> specifies the line width for each of the lines; it is not the total line width. The given <i>midLineWidth</i> specifies the width of a middle line drawn in the <a href="qpalette.html#mid">QPalette::mid</a>() color.</p> <p>The line appears sunken if <i>sunken</i> is true, otherwise raised.</p> <p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p> <p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded line:</p> <pre> QFrame frame: frame.setFrameStyle(QFrame::HLine | QFrame::Sunken);</pre> <p>See also <a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>(), <a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a>(), and <a href="qstyle.html">QStyle</a>.</p> <a name="//apple_ref/cpp/func//qDrawShadePanel"></a> <h3 class="fn"><a name="qDrawShadePanel"></a>void qDrawShadePanel ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const <a href="qpalette.html">QPalette</a> & <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, const <a href="qbrush.html">QBrush</a> * <i>fill</i> = 0 )</h3> <p>Draws the shaded panel beginning at (<i>x</i>, <i>y</i>) with the given <i>width</i> and <i>height</i> using the provided <i>painter</i> and the given <i>lineWidth</i>.</p> <p>The given <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors). The panel's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p> <p>The panel appears sunken if <i>sunken</i> is true, otherwise raised.</p> <p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p> <p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded panel:</p> <pre> QFrame frame: frame.setFrameStyle( QFrame::Panel | QFrame::Sunken);</pre> <p>See also <a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a>(), <a href="qdrawutil-h.html#qDrawShadeLine">qDrawShadeLine</a>(), <a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>(), and <a href="qstyle.html">QStyle</a>.</p> <h3 class="fn"><a name="qDrawShadePanel-2"></a>void qDrawShadePanel ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qrect.html">QRect</a> & <i>rect</i>, const <a href="qpalette.html">QPalette</a> & <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, const <a href="qbrush.html">QBrush</a> * <i>fill</i> = 0 )</h3> <p>This is an overloaded function.</p> <p>Draws the shaded panel at the rectangle specified by <i>rect</i> using the given <i>painter</i> and the given <i>lineWidth</i>.</p> <p>The given <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors). The panel's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p> <p>The panel appears sunken if <i>sunken</i> is true, otherwise raised.</p> <p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p> <p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded panel:</p> <pre> QFrame frame: frame.setFrameStyle( QFrame::Panel | QFrame::Sunken);</pre> <p>See also <a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a>(), <a href="qdrawutil-h.html#qDrawShadeLine">qDrawShadeLine</a>(), <a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>(), and <a href="qstyle.html">QStyle</a>.</p> <a name="//apple_ref/cpp/func//qDrawShadeRect"></a> <h3 class="fn"><a name="qDrawShadeRect"></a>void qDrawShadeRect ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const <a href="qpalette.html">QPalette</a> & <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0, const <a href="qbrush.html">QBrush</a> * <i>fill</i> = 0 )</h3> <p>Draws the shaded rectangle beginning at (<i>x</i>, <i>y</i>) with the given <i>width</i> and <i>height</i> using the provided <i>painter</i>.</p> <p>The provide <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors. The given <i>lineWidth</i> specifies the line width for each of the lines; it is not the total line width. The <i>midLineWidth</i> specifies the width of a middle line drawn in the <a href="qpalette.html#mid">QPalette::mid</a>() color. The rectangle's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p> <p>The rectangle appears sunken if <i>sunken</i> is true, otherwise raised.</p> <p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p> <p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded rectangle:</p> <pre> QFrame frame: frame.setFrameStyle(QFrame::Box | QFrame::Raised);</pre> <p>See also <a href="qdrawutil-h.html#qDrawShadeLine">qDrawShadeLine</a>(), <a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a>(), <a href="qdrawutil-h.html#qDrawPlainRect">qDrawPlainRect</a>(), and <a href="qstyle.html">QStyle</a>.</p> <h3 class="fn"><a name="qDrawShadeRect-2"></a>void qDrawShadeRect ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qrect.html">QRect</a> & <i>rect</i>, const <a href="qpalette.html">QPalette</a> & <i>palette</i>, bool <i>sunken</i> = false, int <i>lineWidth</i> = 1, int <i>midLineWidth</i> = 0, const <a href="qbrush.html">QBrush</a> * <i>fill</i> = 0 )</h3> <p>This is an overloaded function.</p> <p>Draws the shaded rectangle specified by <i>rect</i> using the given <i>painter</i>.</p> <p>The provide <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors. The given <i>lineWidth</i> specifies the line width for each of the lines; it is not the total line width. The <i>midLineWidth</i> specifies the width of a middle line drawn in the <a href="qpalette.html#mid">QPalette::mid</a>() color. The rectangle's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p> <p>The rectangle appears sunken if <i>sunken</i> is true, otherwise raised.</p> <p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p> <p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded rectangle:</p> <pre> QFrame frame: frame.setFrameStyle(QFrame::Box | QFrame::Raised);</pre> <p>See also <a href="qdrawutil-h.html#qDrawShadeLine">qDrawShadeLine</a>(), <a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a>(), <a href="qdrawutil-h.html#qDrawPlainRect">qDrawPlainRect</a>(), and <a href="qstyle.html">QStyle</a>.</p> <a name="//apple_ref/cpp/func//qDrawWinButton"></a> <h3 class="fn"><a name="qDrawWinButton"></a>void qDrawWinButton ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const <a href="qpalette.html">QPalette</a> & <i>palette</i>, bool <i>sunken</i> = false, const <a href="qbrush.html">QBrush</a> * <i>fill</i> = 0 )</h3> <p>Draws the Windows-style button specified by the given point (<i>x</i>, <i>y</i>}, <i>width</i> and <i>height</i> using the provided <i>painter</i> with a line width of 2 pixels. The button's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p> <p>The given <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors).</p> <p>The button appears sunken if <i>sunken</i> is true, otherwise raised.</p> <p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>()-> Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p> <p>See also <a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a>() and <a href="qstyle.html">QStyle</a>.</p> <h3 class="fn"><a name="qDrawWinButton-2"></a>void qDrawWinButton ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qrect.html">QRect</a> & <i>rect</i>, const <a href="qpalette.html">QPalette</a> & <i>palette</i>, bool <i>sunken</i> = false, const <a href="qbrush.html">QBrush</a> * <i>fill</i> = 0 )</h3> <p>This is an overloaded function.</p> <p>Draws the Windows-style button at the rectangle specified by <i>rect</i> using the given <i>painter</i> with a line width of 2 pixels. The button's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p> <p>The given <i>palette</i> specifies the shading colors (<a href="qpalette.html#light">light</a>, <a href="qpalette.html#dark">dark</a> and <a href="qpalette.html#mid">middle</a> colors).</p> <p>The button appears sunken if <i>sunken</i> is true, otherwise raised.</p> <p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>()-> Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p> <p>See also <a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a>() and <a href="qstyle.html">QStyle</a>.</p> <a name="//apple_ref/cpp/func//qDrawWinPanel"></a> <h3 class="fn"><a name="qDrawWinPanel"></a>void qDrawWinPanel ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, int <i>x</i>, int <i>y</i>, int <i>width</i>, int <i>height</i>, const <a href="qpalette.html">QPalette</a> & <i>palette</i>, bool <i>sunken</i> = false, const <a href="qbrush.html">QBrush</a> * <i>fill</i> = 0 )</h3> <p>Draws the Windows-style panel specified by the given point(<i>x</i>, <i>y</i>), <i>width</i> and <i>height</i> using the provided <i>painter</i> with a line width of 2 pixels. The button's interior is filled with the <i>fill</i> brush unless <i>fill</i> is 0.</p> <p>The given <i>palette</i> specifies the shading colors. The panel appears sunken if <i>sunken</i> is true, otherwise raised.</p> <p><b>Warning:</b> This function does not look at <a href="qwidget.html#style">QWidget::style</a>() or <a href="qapplication.html#style">QApplication::style</a>(). Use the drawing functions in <a href="qstyle.html">QStyle</a> to make widgets that follow the current GUI style.</p> <p>Alternatively you can use a <a href="qframe.html">QFrame</a> widget and apply the <a href="qframe.html#setFrameStyle">QFrame::setFrameStyle</a>() function to display a shaded panel:</p> <pre> QFrame frame: frame.setFrameStyle(QFrame::WinPanel | QFrame::Raised);</pre> <p>See also <a href="qdrawutil-h.html#qDrawShadePanel">qDrawShadePanel</a>(), <a href="qdrawutil-h.html#qDrawWinButton">qDrawWinButton</a>(), and <a href="qstyle.html">QStyle</a>.</p> <p /><address><hr /><div align="center"> <table width="100%" cellspacing="0" border="0"><tr class="address"> <td width="40%" align="left">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)</td> <td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td> <td width="40%" align="right"><div align="right">Qt 4.6.3</div></td> </tr></table></div></address></body> </html>