1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
<title>Qt 4.6: <qdrawutil.h> - Drawing Utility Functions</title>
8
<link href="classic.css" rel="stylesheet" type="text/css" />
11
<table border="0" cellpadding="0" cellspacing="0" width="100%">
13
<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>
14
<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><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
15
</tr></table><h1 class="title"><qdrawutil.h> - Drawing Utility Functions<br /><span class="subtitle"></span>
19
<a name="Functionsx"></a>
21
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
22
<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>
23
<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>
24
<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>
25
<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>
26
<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>
27
<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>
28
<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>
29
<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>
30
<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>
31
<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>
32
<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>
33
<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>
35
<p>See also <a href="qpainter.html">QPainter</a>.</p>
37
<h2>Function Documentation</h2>
38
<a name="//apple_ref/cpp/func//qDrawBorderPixmap" />
39
<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>
40
<p>This is an overloaded function.</p>
41
<p>The qDrawBorderPixmap function is for drawing a pixmap into the margins of a rectangle.</p>
42
<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>
43
<p>This function was introduced in Qt 4.6.</p>
44
<a name="//apple_ref/cpp/func//qDrawPlainRect" />
45
<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>
46
<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>
47
<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>
48
<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>
50
frame.setFrameStyle(QFrame::Box | QFrame::Plain);</pre>
51
<p>See also <a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>() and <a href="qstyle.html">QStyle</a>.</p>
52
<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>
53
<p>This is an overloaded function.</p>
54
<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>
55
<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>
56
<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>
58
frame.setFrameStyle(QFrame::Box | QFrame::Plain);</pre>
59
<p>See also <a href="qdrawutil-h.html#qDrawShadeRect">qDrawShadeRect</a>() and <a href="qstyle.html">QStyle</a>.</p>
60
<a name="//apple_ref/cpp/func//qDrawShadeLine" />
61
<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>
62
<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>
63
<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>
64
<p>The line appears sunken if <i>sunken</i> is true, otherwise raised.</p>
65
<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>
66
<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>
68
frame.setFrameStyle(QFrame::HLine | QFrame::Sunken);</pre>
69
<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>
70
<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>
71
<p>This is an overloaded function.</p>
72
<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>
73
<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>
74
<p>The line appears sunken if <i>sunken</i> is true, otherwise raised.</p>
75
<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>
76
<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>
78
frame.setFrameStyle(QFrame::HLine | QFrame::Sunken);</pre>
79
<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>
80
<a name="//apple_ref/cpp/func//qDrawShadePanel" />
81
<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>
82
<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>
83
<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>
84
<p>The panel appears sunken if <i>sunken</i> is true, otherwise raised.</p>
85
<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>
86
<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>
88
frame.setFrameStyle( QFrame::Panel | QFrame::Sunken);</pre>
89
<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>
90
<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>
91
<p>This is an overloaded function.</p>
92
<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>
93
<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>
94
<p>The panel appears sunken if <i>sunken</i> is true, otherwise raised.</p>
95
<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>
96
<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>
98
frame.setFrameStyle( QFrame::Panel | QFrame::Sunken);</pre>
99
<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>
100
<a name="//apple_ref/cpp/func//qDrawShadeRect" />
101
<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>
102
<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>
103
<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>
104
<p>The rectangle appears sunken if <i>sunken</i> is true, otherwise raised.</p>
105
<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>
106
<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>
108
frame.setFrameStyle(QFrame::Box | QFrame::Raised);</pre>
109
<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>
110
<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>
111
<p>This is an overloaded function.</p>
112
<p>Draws the shaded rectangle specified by <i>rect</i> using the given <i>painter</i>.</p>
113
<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>
114
<p>The rectangle appears sunken if <i>sunken</i> is true, otherwise raised.</p>
115
<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>
116
<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>
118
frame.setFrameStyle(QFrame::Box | QFrame::Raised);</pre>
119
<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>
120
<a name="//apple_ref/cpp/func//qDrawWinButton" />
121
<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>
122
<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>
123
<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>
124
<p>The button appears sunken if <i>sunken</i> is true, otherwise raised.</p>
125
<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>
126
<p>See also <a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a>() and <a href="qstyle.html">QStyle</a>.</p>
127
<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>
128
<p>This is an overloaded function.</p>
129
<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>
130
<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>
131
<p>The button appears sunken if <i>sunken</i> is true, otherwise raised.</p>
132
<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>
133
<p>See also <a href="qdrawutil-h.html#qDrawWinPanel">qDrawWinPanel</a>() and <a href="qstyle.html">QStyle</a>.</p>
134
<a name="//apple_ref/cpp/func//qDrawWinPanel" />
135
<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>
136
<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>
137
<p>The given <i>palette</i> specifies the shading colors. The panel appears sunken if <i>sunken</i> is true, otherwise raised.</p>
138
<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>
139
<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>
141
frame.setFrameStyle(QFrame::WinPanel | QFrame::Raised);</pre>
142
<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>
143
<p /><address><hr /><div align="center">
144
<table width="100%" cellspacing="0" border="0"><tr class="address">
145
<td width="40%" align="left">Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
146
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
147
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
148
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>