File: qstyle.html

package info (click to toggle)
python-qt4 4.11.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 39,748 kB
  • ctags: 6,146
  • sloc: python: 125,938; cpp: 12,612; xml: 292; makefile: 258; php: 27; sh: 27
file content (4462 lines) | stat: -rw-r--r-- 203,430 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QStyle Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QStyle Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QStyle class is an abstract base class that encapsulates the
look and feel of a GUI. <a href="#details">More...</a></p>

<p>Inherits <a href="qobject.html">QObject</a>.</p><p>Inherited by <a href="qcommonstyle.html">QCommonStyle</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qstyle.html#ComplexControl-enum">ComplexControl</a></b> { CC_SpinBox, CC_ComboBox, CC_ScrollBar, CC_Slider, ..., CC_CustomBase }</li><li><div class="fn" />enum <b><a href="qstyle.html#ContentsType-enum">ContentsType</a></b> { CT_PushButton, CT_CheckBox, CT_RadioButton, CT_ToolButton, ..., CT_CustomBase }</li><li><div class="fn" />enum <b><a href="qstyle.html#ControlElement-enum">ControlElement</a></b> { CE_PushButton, CE_PushButtonBevel, CE_PushButtonLabel, CE_CheckBox, ..., CE_CustomBase }</li><li><div class="fn" />enum <b><a href="qstyle.html#PixelMetric-enum">PixelMetric</a></b> { PM_ButtonMargin, PM_ButtonDefaultIndicator, PM_MenuButtonIndicator, PM_ButtonShiftHorizontal, ..., PM_CustomBase }</li><li><div class="fn" />enum <b><a href="qstyle.html#PrimitiveElement-enum">PrimitiveElement</a></b> { PE_Q3CheckListController, PE_Q3CheckListExclusiveIndicator, PE_Q3CheckListIndicator, PE_Q3DockWindowSeparator, ..., PE_CustomBase }</li><li><div class="fn" />enum <b><a href="qstyle.html#RequestSoftwareInputPanel-enum">RequestSoftwareInputPanel</a></b> { RSIP_OnMouseClickAndAlreadyFocused, RSIP_OnMouseClick }</li><li><div class="fn" />enum <b><a href="qstyle.html#StandardPixmap-enum">StandardPixmap</a></b> { SP_TitleBarMenuButton, SP_TitleBarMinButton, SP_TitleBarMaxButton, SP_TitleBarCloseButton, ..., SP_CustomBase }</li><li><div class="fn" />class <b><a href="qstyle-state.html">State</a></b></li><li><div class="fn" />enum <b><a href="qstyle.html#StateFlag-enum">StateFlag</a></b> { State_None, State_Enabled, State_Raised, State_Sunken, ..., State_Mini }</li><li><div class="fn" />enum <b><a href="qstyle.html#StyleHint-enum">StyleHint</a></b> { SH_EtchDisabledText, SH_DitherDisabledText, SH_ScrollBar_MiddleClickAbsolutePosition, SH_ScrollBar_ScrollWhenPointerLeavesControl, ..., SH_CustomBase }</li><li><div class="fn" />enum <b><a href="qstyle.html#SubControl-enum">SubControl</a></b> { SC_None, SC_ScrollBarAddLine, SC_ScrollBarSubLine, SC_ScrollBarAddPage, ..., SC_All }</li><li><div class="fn" />class <b><a href="qstyle-subcontrols.html">SubControls</a></b></li><li><div class="fn" />enum <b><a href="qstyle.html#SubElement-enum">SubElement</a></b> { SE_PushButtonContents, SE_PushButtonFocusRect, SE_CheckBoxIndicator, SE_CheckBoxContents, ..., SE_CustomBase }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qstyle.html#QStyle">__init__</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qstyle.html#combinedLayoutSpacing">combinedLayoutSpacing</a></b> (<i>self</i>, QSizePolicy.ControlTypes&#160;<i>controls1</i>, QSizePolicy.ControlTypes&#160;<i>controls2</i>, Qt.Orientation&#160;<i>orientation</i>, QStyleOption&#160;<i>option</i>&#160;=&#160;None, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qstyle.html#drawComplexControl">drawComplexControl</a></b> (<i>self</i>, ComplexControl&#160;<i>cc</i>, QStyleOptionComplex&#160;<i>opt</i>, QPainter&#160;<i>p</i>, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qstyle.html#drawControl">drawControl</a></b> (<i>self</i>, ControlElement&#160;<i>element</i>, QStyleOption&#160;<i>opt</i>, QPainter&#160;<i>p</i>, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qstyle.html#drawItemPixmap">drawItemPixmap</a></b> (<i>self</i>, QPainter&#160;<i>painter</i>, QRect&#160;<i>rect</i>, int&#160;<i>alignment</i>, QPixmap&#160;<i>pixmap</i>)</li><li><div class="fn" /><b><a href="qstyle.html#drawItemText">drawItemText</a></b> (<i>self</i>, QPainter&#160;<i>painter</i>, QRect&#160;<i>rectangle</i>, int&#160;<i>alignment</i>, QPalette&#160;<i>palette</i>, bool&#160;<i>enabled</i>, QString&#160;<i>text</i>, QPalette.ColorRole&#160;<i>textRole</i>&#160;=&#160;QPalette.NoRole)</li><li><div class="fn" /><b><a href="qstyle.html#drawPrimitive">drawPrimitive</a></b> (<i>self</i>, PrimitiveElement&#160;<i>pe</i>, QStyleOption&#160;<i>opt</i>, QPainter&#160;<i>p</i>, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" />QPixmap <b><a href="qstyle.html#generatedIconPixmap">generatedIconPixmap</a></b> (<i>self</i>, QIcon.Mode&#160;<i>iconMode</i>, QPixmap&#160;<i>pixmap</i>, QStyleOption&#160;<i>opt</i>)</li><li><div class="fn" />SubControl <b><a href="qstyle.html#hitTestComplexControl">hitTestComplexControl</a></b> (<i>self</i>, ComplexControl&#160;<i>cc</i>, QStyleOptionComplex&#160;<i>opt</i>, QPoint&#160;<i>pt</i>, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" />QRect <b><a href="qstyle.html#itemPixmapRect">itemPixmapRect</a></b> (<i>self</i>, QRect&#160;<i>r</i>, int&#160;<i>flags</i>, QPixmap&#160;<i>pixmap</i>)</li><li><div class="fn" />QRect <b><a href="qstyle.html#itemTextRect">itemTextRect</a></b> (<i>self</i>, QFontMetrics&#160;<i>fm</i>, QRect&#160;<i>r</i>, int&#160;<i>flags</i>, bool&#160;<i>enabled</i>, QString&#160;<i>text</i>)</li><li><div class="fn" />int <b><a href="qstyle.html#layoutSpacing">layoutSpacing</a></b> (<i>self</i>, QSizePolicy.ControlType&#160;<i>control1</i>, QSizePolicy.ControlType&#160;<i>control2</i>, Qt.Orientation&#160;<i>orientation</i>, QStyleOption&#160;<i>option</i>&#160;=&#160;None, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" />int <b><a href="qstyle.html#layoutSpacingImplementation">layoutSpacingImplementation</a></b> (<i>self</i>, QSizePolicy.ControlType&#160;<i>control1</i>, QSizePolicy.ControlType&#160;<i>control2</i>, Qt.Orientation&#160;<i>orientation</i>, QStyleOption&#160;<i>option</i>&#160;=&#160;None, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" />int <b><a href="qstyle.html#pixelMetric">pixelMetric</a></b> (<i>self</i>, PixelMetric&#160;<i>metric</i>, QStyleOption&#160;<i>option</i>&#160;=&#160;None, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qstyle.html#polish">polish</a></b> (<i>self</i>, QWidget)</li><li><div class="fn" /><b><a href="qstyle.html#polish-2">polish</a></b> (<i>self</i>, QApplication)</li><li><div class="fn" />QPalette <b><a href="qstyle.html#polish-3">polish</a></b> (<i>self</i>, QPalette)</li><li><div class="fn" />QStyle <b><a href="qstyle.html#proxy">proxy</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qstyle.html#sizeFromContents">sizeFromContents</a></b> (<i>self</i>, ContentsType&#160;<i>ct</i>, QStyleOption&#160;<i>opt</i>, QSize&#160;<i>contentsSize</i>, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" />QIcon <b><a href="qstyle.html#standardIcon">standardIcon</a></b> (<i>self</i>, StandardPixmap&#160;<i>standardIcon</i>, QStyleOption&#160;<i>option</i>&#160;=&#160;None, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" />QIcon <b><a href="qstyle.html#standardIconImplementation">standardIconImplementation</a></b> (<i>self</i>, StandardPixmap&#160;<i>standardIcon</i>, QStyleOption&#160;<i>option</i>&#160;=&#160;None, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" />QPalette <b><a href="qstyle.html#standardPalette">standardPalette</a></b> (<i>self</i>)</li><li><div class="fn" />QPixmap <b><a href="qstyle.html#standardPixmap">standardPixmap</a></b> (<i>self</i>, StandardPixmap&#160;<i>standardPixmap</i>, QStyleOption&#160;<i>option</i>&#160;=&#160;None, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" />int <b><a href="qstyle.html#styleHint">styleHint</a></b> (<i>self</i>, StyleHint&#160;<i>stylehint</i>, QStyleOption&#160;<i>option</i>&#160;=&#160;None, QWidget&#160;<i>widget</i>&#160;=&#160;None, QStyleHintReturn&#160;<i>returnData</i>&#160;=&#160;None)</li><li><div class="fn" />QRect <b><a href="qstyle.html#subControlRect">subControlRect</a></b> (<i>self</i>, ComplexControl&#160;<i>cc</i>, QStyleOptionComplex&#160;<i>opt</i>, SubControl&#160;<i>sc</i>, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" />QRect <b><a href="qstyle.html#subElementRect">subElementRect</a></b> (<i>self</i>, SubElement&#160;<i>subElement</i>, QStyleOption&#160;<i>option</i>, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qstyle.html#unpolish">unpolish</a></b> (<i>self</i>, QWidget)</li><li><div class="fn" /><b><a href="qstyle.html#unpolish-2">unpolish</a></b> (<i>self</i>, QApplication)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />QRect <b><a href="qstyle.html#alignedRect">alignedRect</a></b> (Qt.LayoutDirection&#160;<i>direction</i>, Qt.Alignment&#160;<i>alignment</i>, QSize&#160;<i>size</i>, QRect&#160;<i>rectangle</i>)</li><li><div class="fn" />int <b><a href="qstyle.html#sliderPositionFromValue">sliderPositionFromValue</a></b> (int&#160;<i>min</i>, int&#160;<i>max</i>, int&#160;<i>logicalValue</i>, int&#160;<i>span</i>, bool&#160;<i>upsideDown</i>&#160;=&#160;False)</li><li><div class="fn" />int <b><a href="qstyle.html#sliderValueFromPosition">sliderValueFromPosition</a></b> (int&#160;<i>min</i>, int&#160;<i>max</i>, int&#160;<i>position</i>, int&#160;<i>span</i>, bool&#160;<i>upsideDown</i>&#160;=&#160;False)</li><li><div class="fn" />Qt.Alignment <b><a href="qstyle.html#visualAlignment">visualAlignment</a></b> (Qt.LayoutDirection&#160;<i>direction</i>, Qt.Alignment&#160;<i>alignment</i>)</li><li><div class="fn" />QPoint <b><a href="qstyle.html#visualPos">visualPos</a></b> (Qt.LayoutDirection&#160;<i>direction</i>, QRect&#160;<i>boundingRect</i>, QPoint&#160;<i>logicalPos</i>)</li><li><div class="fn" />QRect <b><a href="qstyle.html#visualRect">visualRect</a></b> (Qt.LayoutDirection&#160;<i>direction</i>, QRect&#160;<i>boundingRect</i>, QRect&#160;<i>logicalRect</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QStyle class is an abstract base class that encapsulates the
look and feel of a GUI.</p>
<p>Qt contains a set of QStyle subclasses that emulate the styles
of the different platforms supported by Qt (<a href="qwindowsstyle.html">QWindowsStyle</a>, <a href="qmacstyle.html">QMacStyle</a>, <a href="qmotifstyle.html">QMotifStyle</a>, etc.). By default, these styles
are built into the <a href="qtgui.html">QtGui</a> library. Styles
can also be made available as plugins.</p>
<p>Qt's built-in widgets use QStyle to perform nearly all of their
drawing, ensuring that they look exactly like the equivalent native
widgets. The diagram below shows a <a href="qcombobox.html">QComboBox</a> in eight different styles.</p>
<p class="centerAlign"><img alt="Eight combo boxes" src="images/qstyle-comboboxes.png" /></p>
<p>Topics:</p>
<a id="setting-a-style" name="setting-a-style" />
<h3>Setting a Style</h3>
<p>The style of the entire application can be set using the
<a href="qapplication.html#setStyle">QApplication.setStyle</a>()
function. It can also be specified by the user of the application,
using the <tt>-style</tt> command-line option:</p>
<pre class="cpp">
 <span class="operator">.</span><span class="operator">/</span>myapplication <span class="operator">-</span>style motif
</pre>
<p>If no style is specified, Qt will choose the most appropriate
style for the user's platform or desktop environment.</p>
<p>A style can also be set on an individual widget using the
<a href="qwidget.html#setStyle">QWidget.setStyle</a>()
function.</p>
<a id="developing-style-aware-custom-widgets" name="developing-style-aware-custom-widgets" />
<h3>Developing Style-Aware Custom Widgets</h3>
<p>If you are developing custom widgets and want them to look good
on all platforms, you can use QStyle functions to perform parts of
the widget drawing, such as <a href="qstyle.html#drawItemText">drawItemText</a>(), <a href="qstyle.html#drawItemPixmap">drawItemPixmap</a>(), <a href="qstyle.html#drawPrimitive">drawPrimitive</a>(), <a href="qstyle.html#drawControl">drawControl</a>(), and <a href="qstyle.html#drawComplexControl">drawComplexControl</a>().</p>
<p>Most QStyle draw functions take four arguments:</p>
<ul>
<li>an enum value specifying which graphical element to draw</li>
<li>a <a href="qstyleoption.html">QStyleOption</a> specifying how
and where to render that element</li>
<li>a <a href="qpainter.html">QPainter</a> that should be used to
draw the element</li>
<li>a <a href="qwidget.html">QWidget</a> on which the drawing is
performed (optional)</li>
</ul>
<p>For example, if you want to draw a focus rectangle on your
widget, you can write:</p>
<pre class="cpp">
 <span class="type">void</span> MyWidget<span class="operator">.</span>paintEvent(<span class="type"><a href="qpaintevent.html">QPaintEvent</a></span> <span class="operator">*</span> <span class="comment">/* event */</span>)
 {
     <span class="type"><a href="qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);

     <span class="type"><a href="qstyleoptionfocusrect.html">QStyleOptionFocusRect</a></span> option;
     option<span class="operator">.</span>initFrom(<span class="keyword">this</span>);
     option<span class="operator">.</span>backgroundColor <span class="operator">=</span> palette()<span class="operator">.</span>color(<span class="type"><a href="qpalette.html">QPalette</a></span><span class="operator">.</span>Background);

     style()<span class="operator">-</span><span class="operator">&gt;</span>drawPrimitive(<span class="type">QStyle</span><span class="operator">.</span>PE_FrameFocusRect<span class="operator">,</span> <span class="operator">&amp;</span>option<span class="operator">,</span> <span class="operator">&amp;</span>painter<span class="operator">,</span> <span class="keyword">this</span>);
 }
</pre>
<p>QStyle gets all the information it needs to render the graphical
element from <a href="qstyleoption.html">QStyleOption</a>. The
widget is passed as the last argument in case the style needs it to
perform special effects (such as animated default buttons on Mac OS
X), but it isn't mandatory. In fact, you can use QStyle to draw on
any paint device, not just widgets, by setting the <a href="qpainter.html">QPainter</a> properly.</p>
<p><a href="qstyleoption.html">QStyleOption</a> has various
subclasses for the various types of graphical elements that can be
drawn. For example, <a href="qstyle.html#PrimitiveElement-enum">PE_FrameFocusRect</a> expects a
<a href="qstyleoptionfocusrect.html">QStyleOptionFocusRect</a>
argument.</p>
<p>To ensure that drawing operations are as fast as possible,
<a href="qstyleoption.html">QStyleOption</a> and its subclasses
have public data members. See the <a href="qstyleoption.html">QStyleOption</a> class documentation for
details on how to use it.</p>
<p>For convenience, Qt provides the <a href="qstylepainter.html">QStylePainter</a> class, which combines a
QStyle, a <a href="qpainter.html">QPainter</a>, and a <a href="qwidget.html">QWidget</a>. This makes it possible to write</p>
<pre class="cpp">
     <span class="type"><a href="qstylepainter.html">QStylePainter</a></span> painter(<span class="keyword">this</span>);
     ...
     painter<span class="operator">.</span>drawPrimitive(<span class="type">QStyle</span><span class="operator">.</span>PE_FrameFocusRect<span class="operator">,</span> option);
</pre>
<p>instead of</p>
<pre class="cpp">
     <span class="type"><a href="qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);
     ...
     style()<span class="operator">-</span><span class="operator">&gt;</span>drawPrimitive(<span class="type">QStyle</span><span class="operator">.</span>PE_FrameFocusRect<span class="operator">,</span> <span class="operator">&amp;</span>option<span class="operator">,</span> <span class="operator">&amp;</span>painter<span class="operator">,</span> <span class="keyword">this</span>);
</pre>
<a id="creating-a-custom-style" name="creating-a-custom-style" />
<h3>Creating a Custom Style</h3>
<p>You can create a custom look and feel for your application by
creating a custom style. There are two approaches to creating a
custom style. In the static approach, you either choose an existing
QStyle class, subclass it, and reimplement virtual functions to
provide the custom behavior, or you create an entire QStyle class
from scratch. In the dynamic approach, you modify the behavior of
your system style at runtime. The static approach is described
below. The dynamic approach is described in <a href="qproxystyle.html">QProxyStyle</a>.</p>
<p>The first step in the static approach is to pick one of the
styles provided by Qt from which you will build your custom style.
Your choice of QStyle class will depend on which style resembles
your desired style the most. The most general class that you can
use as a base is <a href="qcommonstyle.html">QCommonStyle</a> (not
QStyle). This is because Qt requires its styles to be <a href="qcommonstyle.html">QCommonStyle</a>s.</p>
<p>Depending on which parts of the base style you want to change,
you must reimplement the functions that are used to draw those
parts of the interface. To illustrate this, we will modify the look
of the spin box arrows drawn by <a href="qwindowsstyle.html">QWindowsStyle</a>. The arrows are <i>primitive
elements</i> that are drawn by the <a href="qstyle.html#drawPrimitive">drawPrimitive</a>() function, so we
need to reimplement that function. We need the following class
declaration:</p>
<pre class="cpp">
 <span class="keyword">class</span> CustomStyle : <span class="keyword">public</span> <span class="type"><a href="qwindowsstyle.html">QWindowsStyle</a></span>
 {
     Q_OBJECT

 <span class="keyword">public</span>:
     CustomStyle()
     <span class="operator">~</span>CustomStyle() {}

     <span class="type">void</span> drawPrimitive(PrimitiveElement element<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> <span class="operator">*</span>option<span class="operator">,</span>
                        <span class="type"><a href="qpainter.html">QPainter</a></span> <span class="operator">*</span>painter<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qwidget.html">QWidget</a></span> <span class="operator">*</span>widget) <span class="keyword">const</span>;
 };
</pre>
<p>To draw its up and down arrows, <a href="qspinbox.html">QSpinBox</a> uses the <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinUp</a> and
<a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinDown</a>
primitive elements. Here's how to reimplement the <a href="qstyle.html#drawPrimitive">drawPrimitive</a>() function to draw
them differently:</p>
<pre class="cpp">
 <span class="type">void</span> CustomStyle<span class="operator">.</span><a href="qstyle.html#drawPrimitive">drawPrimitive</a>(PrimitiveElement element<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> <span class="operator">*</span>option<span class="operator">,</span>
                                 <span class="type"><a href="qpainter.html">QPainter</a></span> <span class="operator">*</span>painter<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qwidget.html">QWidget</a></span> <span class="operator">*</span>widget) <span class="keyword">const</span>
 {
     <span class="keyword">if</span> (element <span class="operator">=</span><span class="operator">=</span> PE_IndicatorSpinUp <span class="operator">|</span><span class="operator">|</span> element <span class="operator">=</span><span class="operator">=</span> PE_IndicatorSpinDown) {
         <span class="type"><a href="qpolygon.html">QPolygon</a></span> points(<span class="number">3</span>);
         <span class="type">int</span> x <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>x();
         <span class="type">int</span> y <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>y();
         <span class="type">int</span> w <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>width() <span class="operator">/</span> <span class="number">2</span>;
         <span class="type">int</span> h <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>height() <span class="operator">/</span> <span class="number">2</span>;
         x <span class="operator">+</span><span class="operator">=</span> (option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>width() <span class="operator">-</span> w) <span class="operator">/</span> <span class="number">2</span>;
         y <span class="operator">+</span><span class="operator">=</span> (option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>height() <span class="operator">-</span> h) <span class="operator">/</span> <span class="number">2</span>;

         <span class="keyword">if</span> (element <span class="operator">=</span><span class="operator">=</span> PE_IndicatorSpinUp) {
             points<span class="operator">[</span><span class="number">0</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="qpoint.html">QPoint</a></span>(x<span class="operator">,</span> y <span class="operator">+</span> h);
             points<span class="operator">[</span><span class="number">1</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="qpoint.html">QPoint</a></span>(x <span class="operator">+</span> w<span class="operator">,</span> y <span class="operator">+</span> h);
             points<span class="operator">[</span><span class="number">2</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="qpoint.html">QPoint</a></span>(x <span class="operator">+</span> w <span class="operator">/</span> <span class="number">2</span><span class="operator">,</span> y);
         } <span class="keyword">else</span> { <span class="comment">// PE_SpinBoxDown</span>
             points<span class="operator">[</span><span class="number">0</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="qpoint.html">QPoint</a></span>(x<span class="operator">,</span> y);
             points<span class="operator">[</span><span class="number">1</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="qpoint.html">QPoint</a></span>(x <span class="operator">+</span> w<span class="operator">,</span> y);
             points<span class="operator">[</span><span class="number">2</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="qpoint.html">QPoint</a></span>(x <span class="operator">+</span> w <span class="operator">/</span> <span class="number">2</span><span class="operator">,</span> y <span class="operator">+</span> h);
         }

         <span class="keyword">if</span> (option<span class="operator">-</span><span class="operator">&gt;</span>state <span class="operator">&amp;</span> State_Enabled) {
             painter<span class="operator">-</span><span class="operator">&gt;</span>setPen(option<span class="operator">-</span><span class="operator">&gt;</span>palette<span class="operator">.</span>mid()<span class="operator">.</span>color());
             painter<span class="operator">-</span><span class="operator">&gt;</span>setBrush(option<span class="operator">-</span><span class="operator">&gt;</span>palette<span class="operator">.</span>buttonText());
         } <span class="keyword">else</span> {
             painter<span class="operator">-</span><span class="operator">&gt;</span>setPen(option<span class="operator">-</span><span class="operator">&gt;</span>palette<span class="operator">.</span>buttonText()<span class="operator">.</span>color());
             painter<span class="operator">-</span><span class="operator">&gt;</span>setBrush(option<span class="operator">-</span><span class="operator">&gt;</span>palette<span class="operator">.</span>mid());
         }
         painter<span class="operator">-</span><span class="operator">&gt;</span>drawPolygon(points);
     } <span class="keyword">else</span> {
         <span class="type"><a href="qwindowsstyle.html">QWindowsStyle</a></span><span class="operator">.</span>drawPrimitive(element<span class="operator">,</span> option<span class="operator">,</span> painter<span class="operator">,</span> widget);
     }
 }
</pre>
<p>Notice that we don't use the <tt>widget</tt> argument, except to
pass it on to the QWindowStyle.drawPrimitive() function. As
mentioned earlier, the information about what is to be drawn and
how it should be drawn is specified by a <a href="qstyleoption.html">QStyleOption</a> object, so there is no need to
ask the widget.</p>
<p>If you need to use the <tt>widget</tt> argument to obtain
additional information, be careful to ensure that it isn't 0 and
that it is of the correct type before using it. For example:</p>
<pre class="cpp">
     <span class="type"><a href="qspinbox.html">QSpinBox</a></span> <span class="operator">*</span>spinBox <span class="operator">=</span> qobject_cast<span class="operator">&lt;</span><span class="type"><a href="qspinbox.html">QSpinBox</a></span> <span class="operator">*</span><span class="operator">&gt;</span>(widget);
     <span class="keyword">if</span> (spinBox) {
     ...
     }
</pre>
<p>When implementing a custom style, you cannot assume that the
widget is a <a href="qspinbox.html">QSpinBox</a> just because the
enum value is called <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinUp</a> or
<a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinDown</a>.</p>
<p>The documentation for the <a href="widgets-styles.html">Styles</a> example covers this topic in more
detail.</p>
<p><b>Warning:</b> Qt style sheets are currently not supported for
custom QStyle subclasses. We plan to address this in some future
release.</p>
<a id="using-a-custom-style" name="using-a-custom-style" />
<h3>Using a Custom Style</h3>
<p>There are several ways of using a custom style in a Qt
application. The simplest way is to pass the custom style to the
<a href="qapplication.html#setStyle">QApplication.setStyle</a>()
static function before creating the <a href="qapplication.html">QApplication</a> object:</p>
<pre class="cpp">
 <span class="preprocessor">#include &lt;QtGui&gt;</span>

 <span class="preprocessor">#include "customstyle.h"</span>

 <span class="type">int</span> main(<span class="type">int</span> argc<span class="operator">,</span> <span class="type">char</span> <span class="operator">*</span>argv<span class="operator">[</span><span class="operator">]</span>)
 {
     <span class="type"><a href="qapplication.html">QApplication</a></span><span class="operator">.</span>setStyle(<span class="keyword">new</span> CustomStyle);
     <span class="type"><a href="qapplication.html">QApplication</a></span> app(argc<span class="operator">,</span> argv);
     <span class="type"><a href="qspinbox.html">QSpinBox</a></span> spinBox;
     spinBox<span class="operator">.</span>show();
     <span class="keyword">return</span> app<span class="operator">.</span>exec();
 }
</pre>
<p>You can call <a href="qapplication.html#setStyle">QApplication.setStyle</a>() at any
time, but by calling it before the constructor, you ensure that the
user's preference, set using the <tt>-style</tt> command-line
option, is respected.</p>
<p>You may want to make your custom style available for use in
other applications, which may not be yours and hence not available
for you to recompile. The Qt Plugin system makes it possible to
create styles as plugins. Styles created as plugins are loaded as
shared objects at runtime by Qt itself. Please refer to the
<a href="plugins-howto.html">Qt Plugin</a> documentation for more
information on how to go about creating a style plugin.</p>
<p>Compile your plugin and put it into Qt's <tt>plugins/styles</tt>
directory. We now have a pluggable style that Qt can load
automatically. To use your new style with existing applications,
simply start the application with the following argument:</p>
<pre class="cpp">
 <span class="operator">.</span><span class="operator">/</span>myapplication <span class="operator">-</span>style custom
</pre>
<p>The application will use the look and feel from the custom style
you implemented.</p>
<a id="right-to-left-desktops" name="right-to-left-desktops" />
<h3>Right-to-Left Desktops</h3>
<p>Languages written from right to left (such as Arabic and Hebrew)
usually also mirror the whole layout of widgets, and require the
light to come from the screen's top-right corner instead of
top-left.</p>
<p>If you create a custom style, you should take special care when
drawing asymmetric elements to make sure that they also look
correct in a mirrored layout. An easy way to test your styles is to
run applications with the <tt>-reverse</tt> command-line option or
to call <a href="qapplication.html#layoutDirection-prop">QApplication.setLayoutDirection</a>()
in your <tt>main()</tt> function.</p>
<p>Here are some things to keep in mind when making a style work
well in a right-to-left environment:</p>
<ul>
<li><a href="qstyle.html#subControlRect">subControlRect</a>() and
<a href="qstyle.html#subElementRect">subElementRect</a>() return
rectangles in screen coordinates</li>
<li><a href="qstyleoption.html#direction-var">QStyleOption.direction</a>
indicates in which direction the item should be drawn in</li>
<li>If a style is not right-to-left aware it will display items as
if it were left-to-right</li>
<li><a href="qstyle.html#visualRect">visualRect</a>(), <a href="qstyle.html#visualPos">visualPos</a>(), and <a href="qstyle.html#visualAlignment">visualAlignment</a>() are helpful
functions that will translate from logical to screen
representations.</li>
<li><a href="qstyle.html#alignedRect">alignedRect</a>() will return
a logical rect aligned for the current direction</li>
</ul>
<a id="styles-in-item-views" name="styles-in-item-views" />
<h3>Styles in Item Views</h3>
<p>The painting of items in views is performed by a delegate. Qt's
default delegate, <a href="qstyleditemdelegate.html">QStyledItemDelegate</a>, is also used
for calculating bounding rectangles of items, and their
sub-elements for the various kind of item <a href="qt.html#ItemDataRole-enum">data roles</a> <a href="qstyleditemdelegate.html">QStyledItemDelegate</a> supports. See
the <a href="qstyleditemdelegate.html">QStyledItemDelegate</a>
class description to find out which datatypes and roles are
supported. You can read more about item data roles in <a href="model-view-programming.html">Model/View Programming</a>.</p>
<p>When <a href="qstyleditemdelegate.html">QStyledItemDelegate</a>
paints its items, it draws <a href="qstyle.html#ControlElement-enum">CE_ItemViewItem</a>, and
calculates their size with <a href="qstyle.html#ContentsType-enum">CT_ItemViewItem</a>. Note also that
it uses <a href="qstyle.html#SubElement-enum">SE_ItemViewItemText</a> to set the
size of editors. When implementing a style to customize drawing of
item views, you need to check the implementation of <a href="qcommonstyle.html">QCommonStyle</a> (and any other subclasses from
which your style inherits). This way, you find out which and how
other style elements are painted, and you can then reimplement the
painting of elements that should be drawn differently.</p>
<p>We include a small example where we customize the drawing of
item backgrounds.</p>
<pre class="cpp">
     <span class="keyword">switch</span> (element) {
         <span class="keyword">case</span> (PE_PanelItemViewItem): {
             painter<span class="operator">-</span><span class="operator">&gt;</span>save();

             <span class="type"><a href="qpoint.html">QPoint</a></span> topLeft <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>topLeft();
             <span class="type"><a href="qpoint.html">QPoint</a></span> bottomRight <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>topRight();
             <span class="type"><a href="qlineargradient.html">QLinearGradient</a></span> backgroundGradient(topLeft<span class="operator">,</span> bottomRight);
             backgroundGradient<span class="operator">.</span>setColorAt(<span class="number">0.0</span><span class="operator">,</span> <span class="type"><a href="qcolor.html">QColor</a></span>(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>yellow)<span class="operator">.</span>lighter(<span class="number">190</span>));
             backgroundGradient<span class="operator">.</span>setColorAt(<span class="number">1.0</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>white);
             painter<span class="operator">-</span><span class="operator">&gt;</span>fillRect(option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">,</span> <span class="type"><a href="qbrush.html">QBrush</a></span>(backgroundGradient));

             painter<span class="operator">-</span><span class="operator">&gt;</span>restore();
         <span class="keyword">break</span>;
         }
         <span class="keyword">default</span>:
             <span class="type"><a href="qwindowsstyle.html">QWindowsStyle</a></span><span class="operator">.</span>drawPrimitive(element<span class="operator">,</span> option<span class="operator">,</span> painter<span class="operator">,</span> widget);
     }
</pre>
<p>The primitive element <a href="qstyle.html#PrimitiveElement-enum">PE_PanelItemViewItem</a> is
responsible for painting the background of items, and is called
from <a href="qcommonstyle.html">QCommonStyle</a>'s implementation
of <a href="qstyle.html#ControlElement-enum">CE_ItemViewItem</a>.</p>
<p>To add support for drawing of new datatypes and item data roles,
it is necessary to create a custom delegate. But if you only need
to support the datatypes implemented by the default delegate, a
custom style does not need an accompanying delegate. The <a href="qstyleditemdelegate.html">QStyledItemDelegate</a> class
description gives more information on custom delegates.</p>
<p>The drawing of item view headers is also done by the style,
giving control over size of header items and row and column
sizes.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="ComplexControl-enum" />QStyle.ComplexControl</h3><p>This enum describes the available complex controls. Complex
controls have different behavior depending upon where the user
clicks on them or which keys are pressed.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CC_SpinBox</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">A spinbox, like <a href="qspinbox.html">QSpinBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CC_ComboBox</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">A combobox, like <a href="qcombobox.html">QComboBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CC_ScrollBar</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">A scroll bar, like <a href="qscrollbar.html">QScrollBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CC_Slider</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">A slider, like <a href="qslider.html">QSlider</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CC_ToolButton</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">A tool button, like <a href="qtoolbutton.html">QToolButton</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CC_TitleBar</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">A Title bar, like those used in <a href="qmdisubwindow.html">QMdiSubWindow</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CC_Q3ListView</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">Used for drawing the <a class="compat" href="q3listview.html">Q3ListView</a> class.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CC_GroupBox</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">A group box, like <a href="qgroupbox.html">QGroupBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CC_Dial</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">A dial, like <a href="qdial.html">QDial</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CC_MdiControls</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">The minimize, close, and normal button in the
menu bar for a maximized MDI subwindow.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CC_CustomBase</tt></td>
<td class="topAlign"><tt>0xf0000000</tt></td>
<td class="topAlign">Base value for custom complex controls. Custom
values must be greater than this value.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#SubControl-enum">SubControl</a> and <a href="qstyle.html#drawComplexControl">drawComplexControl</a>().</p>


<h3 class="fn"><a name="ContentsType-enum" />QStyle.ContentsType</h3><p>This enum describes the available contents types. These are used
to calculate sizes for the contents of various widgets.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_CheckBox</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">A check box, like <a href="qcheckbox.html">QCheckBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_ComboBox</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">A combo box, like <a href="qcombobox.html">QComboBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_Q3DockWindow</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">A <a class="compat" href="q3dockwindow.html">Q3DockWindow</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_HeaderSection</tt></td>
<td class="topAlign"><tt>21</tt></td>
<td class="topAlign">A header section, like <a href="porting4.html#qheader">QHeader</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_LineEdit</tt></td>
<td class="topAlign"><tt>16</tt></td>
<td class="topAlign">A line edit, like <a href="qlineedit.html">QLineEdit</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_Menu</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">A menu, like <a href="qmenu.html">QMenu</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_Q3Header</tt></td>
<td class="topAlign"><tt>15</tt></td>
<td class="topAlign">A Qt 3 header section, like <a class="compat" href="q3header.html">Q3Header</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_MenuBar</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">A menu bar, like <a href="qmenubar.html">QMenuBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_MenuBarItem</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">A menu bar item, like the buttons in a
<a href="qmenubar.html">QMenuBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_MenuItem</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">A menu item, like <a class="compat" href="qmenuitem.html">QMenuItem</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_ProgressBar</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">A progress bar, like <a href="qprogressbar.html">QProgressBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_PushButton</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">A push button, like <a href="qpushbutton.html">QPushButton</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_RadioButton</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">A radio button, like <a href="qradiobutton.html">QRadioButton</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_SizeGrip</tt></td>
<td class="topAlign"><tt>18</tt></td>
<td class="topAlign">A size grip, like <a href="qsizegrip.html">QSizeGrip</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_Slider</tt></td>
<td class="topAlign"><tt>13</tt></td>
<td class="topAlign">A slider, like <a href="qslider.html">QSlider</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_ScrollBar</tt></td>
<td class="topAlign"><tt>14</tt></td>
<td class="topAlign">A scroll bar, like <a href="qscrollbar.html">QScrollBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_SpinBox</tt></td>
<td class="topAlign"><tt>17</tt></td>
<td class="topAlign">A spin box, like <a href="qspinbox.html">QSpinBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_Splitter</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">A splitter, like <a href="qsplitter.html">QSplitter</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_TabBarTab</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">A tab on a tab bar, like <a href="qtabbar.html">QTabBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_TabWidget</tt></td>
<td class="topAlign"><tt>19</tt></td>
<td class="topAlign">A tab widget, like <a href="qtabwidget.html">QTabWidget</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_ToolButton</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">A tool button, like <a href="qtoolbutton.html">QToolButton</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_GroupBox</tt></td>
<td class="topAlign"><tt>22</tt></td>
<td class="topAlign">A group box, like <a href="qgroupbox.html">QGroupBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_ItemViewItem</tt></td>
<td class="topAlign"><tt>24</tt></td>
<td class="topAlign">An item inside an item view.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_CustomBase</tt></td>
<td class="topAlign"><tt>0xf0000000</tt></td>
<td class="topAlign">Base value for custom contents types. Custom
values must be greater than this value.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CT_MdiControls</tt></td>
<td class="topAlign"><tt>23</tt></td>
<td class="topAlign">The minimize, normal, and close button in the
menu bar for a maximized MDI subwindow.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#sizeFromContents">sizeFromContents</a>().</p>


<h3 class="fn"><a name="ControlElement-enum" />QStyle.ControlElement</h3><p>This enum represents a control element. A control element is a
part of a widget that performs some action or displays information
to the user.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_PushButton</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">A <a href="qpushbutton.html">QPushButton</a>,
draws CE_PushButtonBevel, CE_PushButtonLabel and <a href="qstyle.html#PrimitiveElement-enum">PE_FrameFocusRect</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_PushButtonBevel</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The bevel and default indicator of a <a href="qpushbutton.html">QPushButton</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_PushButtonLabel</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The label (an icon with text or pixmap) of a
<a href="qpushbutton.html">QPushButton</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_DockWidgetTitle</tt></td>
<td class="topAlign"><tt>31</tt></td>
<td class="topAlign">Dock window title.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_Splitter</tt></td>
<td class="topAlign"><tt>29</tt></td>
<td class="topAlign">Splitter handle; see also <a href="qsplitter.html">QSplitter</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_CheckBox</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">A <a href="qcheckbox.html">QCheckBox</a>,
draws a <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorCheckBox</a>, a
CE_CheckBoxLabel and a <a href="qstyle.html#PrimitiveElement-enum">PE_FrameFocusRect</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_CheckBoxLabel</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">The label (text or pixmap) of a <a href="qcheckbox.html">QCheckBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_RadioButton</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">A <a href="qradiobutton.html">QRadioButton</a>, draws a <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorRadioButton</a>, a
CE_RadioButtonLabel and a <a href="qstyle.html#PrimitiveElement-enum">PE_FrameFocusRect</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_RadioButtonLabel</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">The label (text or pixmap) of a <a href="qradiobutton.html">QRadioButton</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_TabBarTab</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">The tab and label within a <a href="qtabbar.html">QTabBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_TabBarTabShape</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">The tab shape within a tab bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_TabBarTabLabel</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">The label within a tab.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ProgressBar</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">A <a href="qprogressbar.html">QProgressBar</a>, draws CE_ProgressBarGroove,
CE_ProgressBarContents and CE_ProgressBarLabel.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ProgressBarGroove</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">The groove where the progress indicator is
drawn in a <a href="qprogressbar.html">QProgressBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ProgressBarContents</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">The progress indicator of a <a href="qprogressbar.html">QProgressBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ProgressBarLabel</tt></td>
<td class="topAlign"><tt>13</tt></td>
<td class="topAlign">The text label of a <a href="qprogressbar.html">QProgressBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ToolButtonLabel</tt></td>
<td class="topAlign"><tt>22</tt></td>
<td class="topAlign">A tool button's label.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_MenuBarItem</tt></td>
<td class="topAlign"><tt>20</tt></td>
<td class="topAlign">A menu item in a <a href="qmenubar.html">QMenuBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_MenuBarEmptyArea</tt></td>
<td class="topAlign"><tt>21</tt></td>
<td class="topAlign">The empty area of a <a href="qmenubar.html">QMenuBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_MenuItem</tt></td>
<td class="topAlign"><tt>14</tt></td>
<td class="topAlign">A menu item in a <a href="qmenu.html">QMenu</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_MenuScroller</tt></td>
<td class="topAlign"><tt>15</tt></td>
<td class="topAlign">Scrolling areas in a <a href="qmenu.html">QMenu</a> when the style supports scrolling.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_MenuTearoff</tt></td>
<td class="topAlign"><tt>18</tt></td>
<td class="topAlign">A menu item representing the tear off section
of a <a href="qmenu.html">QMenu</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_MenuEmptyArea</tt></td>
<td class="topAlign"><tt>19</tt></td>
<td class="topAlign">The area in a menu without menu items.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_MenuHMargin</tt></td>
<td class="topAlign"><tt>17</tt></td>
<td class="topAlign">The horizontal extra space on the left/right
of a menu.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_MenuVMargin</tt></td>
<td class="topAlign"><tt>16</tt></td>
<td class="topAlign">The vertical extra space on the top/bottom of
a menu.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_Q3DockWindowEmptyArea</tt></td>
<td class="topAlign"><tt>26</tt></td>
<td class="topAlign">The empty area of a <a href="qdockwidget.html">QDockWidget</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ToolBoxTab</tt></td>
<td class="topAlign"><tt>27</tt></td>
<td class="topAlign">The toolbox's tab and label within a <a href="qtoolbox.html">QToolBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_SizeGrip</tt></td>
<td class="topAlign"><tt>28</tt></td>
<td class="topAlign">Window resize handle; see also <a href="qsizegrip.html">QSizeGrip</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_Header</tt></td>
<td class="topAlign"><tt>23</tt></td>
<td class="topAlign">A header.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_HeaderSection</tt></td>
<td class="topAlign"><tt>24</tt></td>
<td class="topAlign">A header section.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_HeaderLabel</tt></td>
<td class="topAlign"><tt>25</tt></td>
<td class="topAlign">The header's label.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ScrollBarAddLine</tt></td>
<td class="topAlign"><tt>32</tt></td>
<td class="topAlign">Scroll bar line increase indicator. (i.e.,
scroll down); see also <a href="qscrollbar.html">QScrollBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ScrollBarSubLine</tt></td>
<td class="topAlign"><tt>33</tt></td>
<td class="topAlign">Scroll bar line decrease indicator (i.e.,
scroll up).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ScrollBarAddPage</tt></td>
<td class="topAlign"><tt>34</tt></td>
<td class="topAlign">Scolllbar page increase indicator (i.e., page
down).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ScrollBarSubPage</tt></td>
<td class="topAlign"><tt>35</tt></td>
<td class="topAlign">Scroll bar page decrease indicator (i.e., page
up).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ScrollBarSlider</tt></td>
<td class="topAlign"><tt>36</tt></td>
<td class="topAlign">Scroll bar slider.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ScrollBarFirst</tt></td>
<td class="topAlign"><tt>37</tt></td>
<td class="topAlign">Scroll bar first line indicator (i.e.,
home).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ScrollBarLast</tt></td>
<td class="topAlign"><tt>38</tt></td>
<td class="topAlign">Scroll bar last line indicator (i.e.,
end).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_RubberBand</tt></td>
<td class="topAlign"><tt>30</tt></td>
<td class="topAlign">Rubber band used in for example an icon
view.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_FocusFrame</tt></td>
<td class="topAlign"><tt>39</tt></td>
<td class="topAlign">Focus frame that is style controlled.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ItemViewItem</tt></td>
<td class="topAlign"><tt>46</tt></td>
<td class="topAlign">An item inside an item view.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_CustomBase</tt></td>
<td class="topAlign"><tt>0xf0000000</tt></td>
<td class="topAlign">Base value for custom control elements; custom
values must be greater than this value.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ComboBoxLabel</tt></td>
<td class="topAlign"><tt>40</tt></td>
<td class="topAlign">The label of a non-editable <a href="qcombobox.html">QComboBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ToolBar</tt></td>
<td class="topAlign"><tt>41</tt></td>
<td class="topAlign">A toolbar like <a href="qtoolbar.html">QToolBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ToolBoxTabShape</tt></td>
<td class="topAlign"><tt>42</tt></td>
<td class="topAlign">The toolbox's tab shape.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ToolBoxTabLabel</tt></td>
<td class="topAlign"><tt>43</tt></td>
<td class="topAlign">The toolbox's tab label.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_HeaderEmptyArea</tt></td>
<td class="topAlign"><tt>44</tt></td>
<td class="topAlign">The area of a header view where there are no
header sections.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.CE_ShapedFrame</tt></td>
<td class="topAlign"><tt>47</tt></td>
<td class="topAlign">The frame with the shape specified in the
<a href="qstyleoptionframev3.html">QStyleOptionFrameV3</a>; see
<a href="qframe.html">QFrame</a>.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#drawControl">drawControl</a>().</p>


<h3 class="fn"><a name="PixelMetric-enum" />QStyle.PixelMetric</h3><p>This enum describes the various available pixel metrics. A pixel
metric is a style dependent size represented by a single pixel
value.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ButtonMargin</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Amount of whitespace between push button
labels and the frame.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_DockWidgetTitleBarButtonMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Amount of whitespace between dock widget's
title bar button labels and the frame.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_ButtonDefaultIndicator</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Width of the default-button indicator
frame.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MenuButtonIndicator</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Width of the menu button indicator
proportional to the widget height.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ButtonShiftHorizontal</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">Horizontal contents shift of a button when the
button is down.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ButtonShiftVertical</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">Vertical contents shift of a button when the
button is down.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_DefaultFrameWidth</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">Default frame width (usually 2).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_SpinBoxFrameWidth</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">Frame width of a spin box, defaults to
PM_DefaultFrameWidth.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ComboBoxFrameWidth</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">Frame width of a combo box, defaults to
PM_DefaultFrameWidth.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MDIFrameWidth</tt></td>
<td class="topAlign"><tt>PM_MdiSubWindowFrameWidth</tt></td>
<td class="topAlign">Obsolete. Use PM_MdiSubWindowFrameWidth
instead.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_MdiSubWindowFrameWidth</tt></td>
<td class="topAlign"><tt>46</tt></td>
<td class="topAlign">Frame width of an MDI window.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MDIMinimizedWidth</tt></td>
<td class="topAlign"><tt>PM_MdiSubWindowMinimizedWidth</tt></td>
<td class="topAlign">Obsolete. Use PM_MdiSubWindowMinimizedWidth
instead.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_MdiSubWindowMinimizedWidth</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Width of a minimized MDI window.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_LayoutLeftMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Default <a href="qlayout.html#setContentsMargins">left margin</a> for a <a href="qlayout.html">QLayout</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_LayoutTopMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Default <a href="qlayout.html#setContentsMargins">top margin</a> for a <a href="qlayout.html">QLayout</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_LayoutRightMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Default <a href="qlayout.html#setContentsMargins">right margin</a> for a <a href="qlayout.html">QLayout</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_LayoutBottomMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Default <a href="qlayout.html#setContentsMargins">bottom margin</a> for a <a href="qlayout.html">QLayout</a>.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_LayoutHorizontalSpacing</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Default <a href="qlayout.html#spacing-prop">horizontal spacing</a> for a <a href="qlayout.html">QLayout</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_LayoutVerticalSpacing</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Default <a href="qlayout.html#spacing-prop">vertical spacing</a> for a <a href="qlayout.html">QLayout</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MaximumDragDistance</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">The maximum allowed distance between the mouse
and a scrollbar when dragging. Exceeding the specified distance
will cause the slider to jump back to the original position; a
value of -1 disables this behavior.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ScrollBarExtent</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">Width of a vertical scroll bar and the height
of a horizontal scroll bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ScrollBarSliderMin</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">The minimum height of a vertical scroll bar's
slider and the minimum width of a horizontal scroll bar's
slider.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_SliderThickness</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">Total slider thickness.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_SliderControlThickness</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">Thickness of the slider handle.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_SliderLength</tt></td>
<td class="topAlign"><tt>13</tt></td>
<td class="topAlign">Length of the slider.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_SliderTickmarkOffset</tt></td>
<td class="topAlign"><tt>14</tt></td>
<td class="topAlign">The offset between the tickmarks and the
slider.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_SliderSpaceAvailable</tt></td>
<td class="topAlign"><tt>15</tt></td>
<td class="topAlign">The available space for the slider to
move.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_DockWidgetSeparatorExtent</tt></td>
<td class="topAlign"><tt>16</tt></td>
<td class="topAlign">Width of a separator in a horizontal dock
window and the height of a separator in a vertical dock
window.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_DockWidgetHandleExtent</tt></td>
<td class="topAlign"><tt>17</tt></td>
<td class="topAlign">Width of the handle in a horizontal dock
window and the height of the handle in a vertical dock window.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_DockWidgetFrameWidth</tt></td>
<td class="topAlign"><tt>18</tt></td>
<td class="topAlign">Frame width of a dock window.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_DockWidgetTitleMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Margin of the dock window title.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MenuBarPanelWidth</tt></td>
<td class="topAlign"><tt>33</tt></td>
<td class="topAlign">Frame width of a menu bar, defaults to
PM_DefaultFrameWidth.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MenuBarItemSpacing</tt></td>
<td class="topAlign"><tt>34</tt></td>
<td class="topAlign">Spacing between menu bar items.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MenuBarHMargin</tt></td>
<td class="topAlign"><tt>36</tt></td>
<td class="topAlign">Spacing between menu bar items and left/right
of bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MenuBarVMargin</tt></td>
<td class="topAlign"><tt>35</tt></td>
<td class="topAlign">Spacing between menu bar items and top/bottom
of bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ToolBarFrameWidth</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Width of the frame around toolbars.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ToolBarHandleExtent</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Width of a toolbar handle in a horizontal
toolbar and the height of the handle in a vertical toolbar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ToolBarItemMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Spacing between the toolbar frame and the
items.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ToolBarItemSpacing</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Spacing between toolbar items.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_ToolBarSeparatorExtent</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Width of a toolbar separator in a horizontal
toolbar and the height of a separator in a vertical toolbar.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_ToolBarExtensionExtent</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Width of a toolbar extension button in a
horizontal toolbar and the height of the button in a vertical
toolbar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_TabBarTabOverlap</tt></td>
<td class="topAlign"><tt>19</tt></td>
<td class="topAlign">Number of pixels the tabs should overlap.
(Currently only used in styles, not inside of <a href="qtabbar.html">QTabBar</a>)</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_TabBarTabHSpace</tt></td>
<td class="topAlign"><tt>20</tt></td>
<td class="topAlign">Extra space added to the tab width.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_TabBarTabVSpace</tt></td>
<td class="topAlign"><tt>21</tt></td>
<td class="topAlign">Extra space added to the tab height.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_TabBarBaseHeight</tt></td>
<td class="topAlign"><tt>22</tt></td>
<td class="topAlign">Height of the area between the tab bar and the
tab pages.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_TabBarBaseOverlap</tt></td>
<td class="topAlign"><tt>23</tt></td>
<td class="topAlign">Number of pixels the tab bar overlaps the tab
bar base.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_TabBarScrollButtonWidth</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_TabBarTabShiftHorizontal</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Horizontal pixel shift when a tab is
selected.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_TabBarTabShiftVertical</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Vertical pixel shift when a tab is
selected.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ProgressBarChunkWidth</tt></td>
<td class="topAlign"><tt>24</tt></td>
<td class="topAlign">Width of a chunk in a progress bar
indicator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_SplitterWidth</tt></td>
<td class="topAlign"><tt>25</tt></td>
<td class="topAlign">Width of a splitter.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_TitleBarHeight</tt></td>
<td class="topAlign"><tt>26</tt></td>
<td class="topAlign">Height of the title bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_IndicatorWidth</tt></td>
<td class="topAlign"><tt>37</tt></td>
<td class="topAlign">Width of a check box indicator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_IndicatorHeight</tt></td>
<td class="topAlign"><tt>38</tt></td>
<td class="topAlign">Height of a checkbox indicator.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_ExclusiveIndicatorWidth</tt></td>
<td class="topAlign"><tt>39</tt></td>
<td class="topAlign">Width of a radio button indicator.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_ExclusiveIndicatorHeight</tt></td>
<td class="topAlign"><tt>40</tt></td>
<td class="topAlign">Height of a radio button indicator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MenuPanelWidth</tt></td>
<td class="topAlign"><tt>30</tt></td>
<td class="topAlign">Border width (applied on all sides) for a
<a href="qmenu.html">QMenu</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MenuHMargin</tt></td>
<td class="topAlign"><tt>28</tt></td>
<td class="topAlign">Additional border (used on left and right) for
a <a href="qmenu.html">QMenu</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MenuVMargin</tt></td>
<td class="topAlign"><tt>29</tt></td>
<td class="topAlign">Additional border (used for bottom and top)
for a <a href="qmenu.html">QMenu</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MenuScrollerHeight</tt></td>
<td class="topAlign"><tt>27</tt></td>
<td class="topAlign">Height of the scroller area in a <a href="qmenu.html">QMenu</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MenuTearoffHeight</tt></td>
<td class="topAlign"><tt>31</tt></td>
<td class="topAlign">Height of a tear off area in a <a href="qmenu.html">QMenu</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MenuDesktopFrameWidth</tt></td>
<td class="topAlign"><tt>32</tt></td>
<td class="topAlign">The frame width for the menu on the
desktop.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_CheckListButtonSize</tt></td>
<td class="topAlign"><tt>41</tt></td>
<td class="topAlign">Area (width/height) of the checkbox/radio
button in a <a class="compat" href="q3checklistitem.html">Q3CheckListItem</a>.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_CheckListControllerSize</tt></td>
<td class="topAlign"><tt>42</tt></td>
<td class="topAlign">Area (width/height) of the controller in a
<a class="compat" href="q3checklistitem.html">Q3CheckListItem</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_HeaderMarkSize</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The size of the sort indicator in a
header.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_HeaderGripMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The size of the resize grip in a header.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_HeaderMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The size of the margin between the sort
indicator and the text.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_SpinBoxSliderHeight</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The height of the optional spin box
slider.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ToolBarIconSize</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Default tool bar icon size</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_SmallIconSize</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Default small icon size</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_LargeIconSize</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Default large icon size</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_FocusFrameHMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Horizontal margin that the focus frame will
outset the widget by.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_FocusFrameVMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Vertical margin that the focus frame will
outset the widget by.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_IconViewIconSize</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The default size for icons in an icon
view.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ListViewIconSize</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The default size for icons in a list
view.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_ToolTipLabelFrameWidth</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The frame width for a tool tip label.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_CheckBoxLabelSpacing</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The spacing between a check box indicator and
its label.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_RadioButtonLabelSpacing</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The spacing between a radio button indicator
and its label.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_TabBarIconSize</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The default icon size for a tab bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_SizeGripSize</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The size of a size grip.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_MessageBoxIconSize</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The size of the standard icons in a message
box</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_ButtonIconSize</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The default size of button icons</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_TextCursorWidth</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The width of the cursor in a line edit or text
edit</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_TabBar_ScrollButtonOverlap</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The distance between the left and right
buttons in a tab bar.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_TabCloseIndicatorWidth</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The default width of a close button on a tab
in a tab bar.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_TabCloseIndicatorHeight</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The default height of a close button on a tab
in a tab bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_CustomBase</tt></td>
<td class="topAlign"><tt>0xf0000000</tt></td>
<td class="topAlign">Base value for custom pixel metrics. Custom
values must be greater than this value.</td>
</tr>
</table>
<p>The following values are obsolete:</p>
<table class="valuelist">
<tr class="even" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_DefaultTopLevelMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Use PM_LayoutLeftMargin, PM_LayoutTopMargin,
PM_LayoutRightMargin, and PM_LayoutBottomMargin instead.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_DefaultChildMargin</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Use PM_LayoutLeftMargin, PM_LayoutTopMargin,
PM_LayoutRightMargin, and PM_LayoutBottomMargin instead.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_DefaultLayoutSpacing</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Use PM_LayoutHorizontalSpacing and
PM_LayoutVerticalSpacing instead.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PM_ScrollView_ScrollBarSpacing</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Distance between frame and scrollbar with
<a href="qstyle.html#StyleHint-enum">SH_ScrollView_FrameOnlyAroundContents</a>
set.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PM_SubMenuOverlap</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The horizontal overlap between a submenu and
its parent.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#pixelMetric">pixelMetric</a>().</p>


<h3 class="fn"><a name="PrimitiveElement-enum" />QStyle.PrimitiveElement</h3><p>This enum describes the various primitive elements. A primitive
element is a common GUI element, such as a checkbox indicator or
button bevel.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameStatusBar</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">Frame</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelButtonCommand</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Button used to initiate an action, for
example, a <a href="qpushbutton.html">QPushButton</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameDefaultButton</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">This frame around a default button, e.g. in a
dialog.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelButtonBevel</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Generic panel with a button bevel.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelButtonTool</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Panel for a Tool button, used with <a href="qtoolbutton.html">QToolButton</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelLineEdit</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Panel for a <a href="qlineedit.html">QLineEdit</a>.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PE_IndicatorButtonDropDown</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Indicator for a drop down button, for example,
a tool button that displays a menu.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameFocusRect</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">Generic focus indicator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorArrowUp</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Generic Up arrow.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorArrowDown</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Generic Down arrow.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorArrowRight</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Generic Right arrow.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorArrowLeft</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Generic Left arrow.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorSpinUp</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Up symbol for a spin widget, for example a
<a href="qspinbox.html">QSpinBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorSpinDown</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Down symbol for a spin widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorSpinPlus</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Increase symbol for a spin widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorSpinMinus</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Decrease symbol for a spin widget.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PE_IndicatorItemViewItemCheck</tt></td>
<td class="topAlign"><tt>PE_IndicatorViewItemCheck</tt></td>
<td class="topAlign">On/off indicator for a view item.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorCheckBox</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">On/off indicator, for example, a <a href="qcheckbox.html">QCheckBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorRadioButton</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Exclusive on/off indicator, for example, a
<a href="qradiobutton.html">QRadioButton</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_Q3DockWindowSeparator</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">Item separator for Qt 3 compatible dock window
and toolbar contents.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PE_IndicatorDockWidgetResizeHandle</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Resize handle for dock windows.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_Frame</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">Generic frame</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameMenu</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">Frame for popup windows/menus; see also
<a href="qmenu.html">QMenu</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelMenuBar</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Panel for menu bars.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelScrollAreaCorner</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Panel at the bottom-right (or bottom-left)
corner of a scroll area.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameDockWidget</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">Panel frame for dock windows and
toolbars.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameTabWidget</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Frame for tab widgets.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameLineEdit</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">Panel frame for line edits.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameGroupBox</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">Panel frame around group boxes.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameButtonBevel</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Panel frame for a button bevel.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameButtonTool</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Panel frame for a tool button.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorHeaderArrow</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Arrow used to indicate sorting on a list or
table header.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameStatusBarItem</tt></td>
<td class="topAlign"><tt>PE_FrameStatusBar</tt></td>
<td class="topAlign">Frame for an item of a status bar; see also
<a href="qstatusbar.html">QStatusBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameWindow</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Frame around a MDI window or a docking
window.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_Q3Separator</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">Qt 3 compatible generic separator.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PE_IndicatorMenuCheckMark</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Check mark used in a menu.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PE_IndicatorProgressChunk</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Section of a progress bar indicator; see also
<a href="qprogressbar.html">QProgressBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_Q3CheckListController</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Qt 3 compatible controller part of a list view
item.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_Q3CheckListIndicator</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Qt 3 compatible checkbox part of a list view
item.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PE_Q3CheckListExclusiveIndicator</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Qt 3 compatible radio button part of a list
view item.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorBranch</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Lines used to represent the branch of a tree
in a tree view.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PE_IndicatorToolBarHandle</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The handle of a toolbar.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PE_IndicatorToolBarSeparator</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The separator in a toolbar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelToolBar</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The panel for a toolbar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelTipLabel</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The panel for a tip label.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_FrameTabBarBase</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The frame that is drawn for a tab bar,
ususally drawn for a tab bar that isn't part of a tab widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorTabTear</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">An indicator that a tab is partially scrolled
out of the visible tab bar when there are many tabs.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PE_IndicatorColumnViewArrow</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">An arrow in a <a href="qcolumnview.html">QColumnView</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_Widget</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">A plain <a href="qwidget.html">QWidget</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_CustomBase</tt></td>
<td class="topAlign"><tt>0xf000000</tt></td>
<td class="topAlign">Base value for custom primitive elements. All
values above this are reserved for custom use. Custom values must
be greater than this value.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.PE_IndicatorItemViewItemDrop</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">An indicator that is drawn to show where an
item in an item view is about to be dropped during a drag-and-drop
operation in an item view.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelItemViewItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The background for an item in an item
view.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelItemViewRow</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The background of a row in an item view.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelStatusBar</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The panel for a status bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_IndicatorTabClose</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The close button on a tab bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.PE_PanelMenu</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The panel for a menu.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#drawPrimitive">drawPrimitive</a>().</p>


<h3 class="fn"><a name="RequestSoftwareInputPanel-enum" />QStyle.RequestSoftwareInputPanel</h3><p>This enum describes under what circumstances a software input
panel will be requested by input capable widgets.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.RSIP_OnMouseClickAndAlreadyFocused</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Requests an input panel if the user clicks on
the widget, but only if it is already focused.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.RSIP_OnMouseClick</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Requests an input panel if the user clicks on
the widget.</td>
</tr>
</table>
<p><b>See also</b> <a href="qevent.html#Type-enum">QEvent.RequestSoftwareInputPanel</a> and
<a href="qinputcontext.html">QInputContext</a>.</p>


<h3 class="fn"><a name="StandardPixmap-enum" />QStyle.StandardPixmap</h3><p>This enum describes the available standard pixmaps. A standard
pixmap is a pixmap that can follow some existing GUI style or
guideline.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_TitleBarMinButton</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Minimize button on title bars (e.g., in
<a href="qmdisubwindow.html">QMdiSubWindow</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_TitleBarMenuButton</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Menu button on a title bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_TitleBarMaxButton</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Maximize button on title bars.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_TitleBarCloseButton</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">Close button on title bars.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_TitleBarNormalButton</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">Normal (restore) button on title bars.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_TitleBarShadeButton</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">Shade button on title bars.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_TitleBarUnshadeButton</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">Unshade button on title bars.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SP_TitleBarContextHelpButton</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">The Context help button on title bars.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MessageBoxInformation</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">The "information" icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MessageBoxWarning</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">The "warning" icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MessageBoxCritical</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">The "critical" icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MessageBoxQuestion</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">The "question" icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DesktopIcon</tt></td>
<td class="topAlign"><tt>13</tt></td>
<td class="topAlign">The "desktop" icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_TrashIcon</tt></td>
<td class="topAlign"><tt>14</tt></td>
<td class="topAlign">The "trash" icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_ComputerIcon</tt></td>
<td class="topAlign"><tt>15</tt></td>
<td class="topAlign">The "My computer" icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DriveFDIcon</tt></td>
<td class="topAlign"><tt>16</tt></td>
<td class="topAlign">The floppy icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DriveHDIcon</tt></td>
<td class="topAlign"><tt>17</tt></td>
<td class="topAlign">The harddrive icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DriveCDIcon</tt></td>
<td class="topAlign"><tt>18</tt></td>
<td class="topAlign">The CD icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DriveDVDIcon</tt></td>
<td class="topAlign"><tt>19</tt></td>
<td class="topAlign">The DVD icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DriveNetIcon</tt></td>
<td class="topAlign"><tt>20</tt></td>
<td class="topAlign">The network icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DirHomeIcon</tt></td>
<td class="topAlign"><tt>55</tt></td>
<td class="topAlign">The home directory icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DirOpenIcon</tt></td>
<td class="topAlign"><tt>21</tt></td>
<td class="topAlign">The open directory icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DirClosedIcon</tt></td>
<td class="topAlign"><tt>22</tt></td>
<td class="topAlign">The closed directory icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DirIcon</tt></td>
<td class="topAlign"><tt>37</tt></td>
<td class="topAlign">The directory icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DirLinkIcon</tt></td>
<td class="topAlign"><tt>23</tt></td>
<td class="topAlign">The link to directory icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_FileIcon</tt></td>
<td class="topAlign"><tt>24</tt></td>
<td class="topAlign">The file icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_FileLinkIcon</tt></td>
<td class="topAlign"><tt>25</tt></td>
<td class="topAlign">The link to file icon.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_FileDialogStart</tt></td>
<td class="topAlign"><tt>28</tt></td>
<td class="topAlign">The "start" icon in a file dialog.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_FileDialogEnd</tt></td>
<td class="topAlign"><tt>29</tt></td>
<td class="topAlign">The "end" icon in a file dialog.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_FileDialogToParent</tt></td>
<td class="topAlign"><tt>30</tt></td>
<td class="topAlign">The "parent directory" icon in a file
dialog.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_FileDialogNewFolder</tt></td>
<td class="topAlign"><tt>31</tt></td>
<td class="topAlign">The "create new folder" icon in a file
dialog.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SP_FileDialogDetailedView</tt></td>
<td class="topAlign"><tt>32</tt></td>
<td class="topAlign">The detailed view icon in a file dialog.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_FileDialogInfoView</tt></td>
<td class="topAlign"><tt>33</tt></td>
<td class="topAlign">The file info icon in a file dialog.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SP_FileDialogContentsView</tt></td>
<td class="topAlign"><tt>34</tt></td>
<td class="topAlign">The contents view icon in a file dialog.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_FileDialogListView</tt></td>
<td class="topAlign"><tt>35</tt></td>
<td class="topAlign">The list view icon in a file dialog.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_FileDialogBack</tt></td>
<td class="topAlign"><tt>36</tt></td>
<td class="topAlign">The back arrow in a file dialog.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DockWidgetCloseButton</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">Close button on dock windows (see also
<a href="qdockwidget.html">QDockWidget</a>).</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SP_ToolBarHorizontalExtensionButton</tt></td>
<td class="topAlign"><tt>26</tt></td>
<td class="topAlign">Extension button for horizontal toolbars.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SP_ToolBarVerticalExtensionButton</tt></td>
<td class="topAlign"><tt>27</tt></td>
<td class="topAlign">Extension button for vertical toolbars.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DialogOkButton</tt></td>
<td class="topAlign"><tt>38</tt></td>
<td class="topAlign">Icon for a standard OK button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DialogCancelButton</tt></td>
<td class="topAlign"><tt>39</tt></td>
<td class="topAlign">Icon for a standard Cancel button in a
<a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DialogHelpButton</tt></td>
<td class="topAlign"><tt>40</tt></td>
<td class="topAlign">Icon for a standard Help button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DialogOpenButton</tt></td>
<td class="topAlign"><tt>41</tt></td>
<td class="topAlign">Icon for a standard Open button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DialogSaveButton</tt></td>
<td class="topAlign"><tt>42</tt></td>
<td class="topAlign">Icon for a standard Save button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DialogCloseButton</tt></td>
<td class="topAlign"><tt>43</tt></td>
<td class="topAlign">Icon for a standard Close button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DialogApplyButton</tt></td>
<td class="topAlign"><tt>44</tt></td>
<td class="topAlign">Icon for a standard Apply button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DialogResetButton</tt></td>
<td class="topAlign"><tt>45</tt></td>
<td class="topAlign">Icon for a standard Reset button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DialogDiscardButton</tt></td>
<td class="topAlign"><tt>46</tt></td>
<td class="topAlign">Icon for a standard Discard button in a
<a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DialogYesButton</tt></td>
<td class="topAlign"><tt>47</tt></td>
<td class="topAlign">Icon for a standard Yes button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_DialogNoButton</tt></td>
<td class="topAlign"><tt>48</tt></td>
<td class="topAlign">Icon for a standard No button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_ArrowUp</tt></td>
<td class="topAlign"><tt>49</tt></td>
<td class="topAlign">Icon arrow pointing up.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_ArrowDown</tt></td>
<td class="topAlign"><tt>50</tt></td>
<td class="topAlign">Icon arrow pointing down.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_ArrowLeft</tt></td>
<td class="topAlign"><tt>51</tt></td>
<td class="topAlign">Icon arrow pointing left.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_ArrowRight</tt></td>
<td class="topAlign"><tt>52</tt></td>
<td class="topAlign">Icon arrow pointing right.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_ArrowBack</tt></td>
<td class="topAlign"><tt>53</tt></td>
<td class="topAlign">Equivalent to SP_ArrowLeft when the current
layout direction is <a href="qt.html#LayoutDirection-enum">Qt.LeftToRight</a>, otherwise
SP_ArrowRight.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_ArrowForward</tt></td>
<td class="topAlign"><tt>54</tt></td>
<td class="topAlign">Equivalent to SP_ArrowRight when the current
layout direction is <a href="qt.html#LayoutDirection-enum">Qt.LeftToRight</a>, otherwise
SP_ArrowLeft.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_CommandLink</tt></td>
<td class="topAlign"><tt>56</tt></td>
<td class="topAlign">Icon used to indicate a Vista style command
link glyph.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_VistaShield</tt></td>
<td class="topAlign"><tt>57</tt></td>
<td class="topAlign">Icon used to indicate UAC prompts on Windows
Vista. This will return a null pixmap or icon on all other
platforms.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_BrowserReload</tt></td>
<td class="topAlign"><tt>58</tt></td>
<td class="topAlign">Icon indicating that the current page should
be reloaded.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_BrowserStop</tt></td>
<td class="topAlign"><tt>59</tt></td>
<td class="topAlign">Icon indicating that the page loading should
stop.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MediaPlay</tt></td>
<td class="topAlign"><tt>60</tt></td>
<td class="topAlign">Icon indicating that media should begin
playback.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MediaStop</tt></td>
<td class="topAlign"><tt>61</tt></td>
<td class="topAlign">Icon indicating that media should stop
playback.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MediaPause</tt></td>
<td class="topAlign"><tt>62</tt></td>
<td class="topAlign">Icon indicating that media should pause
playback.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MediaSkipForward</tt></td>
<td class="topAlign"><tt>63</tt></td>
<td class="topAlign">Icon indicating that media should skip
forward.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MediaSkipBackward</tt></td>
<td class="topAlign"><tt>64</tt></td>
<td class="topAlign">Icon indicating that media should skip
backward.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MediaSeekForward</tt></td>
<td class="topAlign"><tt>65</tt></td>
<td class="topAlign">Icon indicating that media should seek
forward.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MediaSeekBackward</tt></td>
<td class="topAlign"><tt>66</tt></td>
<td class="topAlign">Icon indicating that media should seek
backward.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MediaVolume</tt></td>
<td class="topAlign"><tt>67</tt></td>
<td class="topAlign">Icon indicating a volume control.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_MediaVolumeMuted</tt></td>
<td class="topAlign"><tt>68</tt></td>
<td class="topAlign">Icon indicating a muted volume control.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SP_CustomBase</tt></td>
<td class="topAlign"><tt>0xf0000000</tt></td>
<td class="topAlign">Base value for custom standard pixmaps; custom
values must be greater than this value.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#standardIcon">standardIcon</a>().</p>


<h3 class="fn"><a name="StateFlag-enum" />QStyle.StateFlag</h3><p>This enum describes flags that are used when drawing primitive
elements.</p>
<p>Note that not all primitives use all of these flags, and that
the flags may mean different things to different items.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_None</tt></td>
<td class="topAlign"><tt>0x00000000</tt></td>
<td class="topAlign">Indicates that the widget does not have a
state.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Active</tt></td>
<td class="topAlign"><tt>0x00010000</tt></td>
<td class="topAlign">Indicates that the widget is active.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_AutoRaise</tt></td>
<td class="topAlign"><tt>0x00001000</tt></td>
<td class="topAlign">Used to indicate if auto-raise appearance
should be usd on a tool button.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Children</tt></td>
<td class="topAlign"><tt>0x00080000</tt></td>
<td class="topAlign">Used to indicate if an item view branch has
children.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_DownArrow</tt></td>
<td class="topAlign"><tt>0x00000040</tt></td>
<td class="topAlign">Used to indicate if a down arrow should be
visible on the widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Editing</tt></td>
<td class="topAlign"><tt>0x00400000</tt></td>
<td class="topAlign">Used to indicate if an editor is opened on the
widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Enabled</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">Used to indicate if the widget is
enabled.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_HasEditFocus</tt></td>
<td class="topAlign"><tt>0x01000000</tt></td>
<td class="topAlign">Used to indicate if the widget currently has
edit focus.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_HasFocus</tt></td>
<td class="topAlign"><tt>0x00000100</tt></td>
<td class="topAlign">Used to indicate if the widget has focus.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Horizontal</tt></td>
<td class="topAlign"><tt>0x00000080</tt></td>
<td class="topAlign">Used to indicate if the widget is laid out
horizontally, for example. a tool bar.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.State_KeyboardFocusChange</tt></td>
<td class="topAlign"><tt>0x00800000</tt></td>
<td class="topAlign">Used to indicate if the focus was changed with
the keyboard, e.g., tab, backtab or shortcut.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_MouseOver</tt></td>
<td class="topAlign"><tt>0x00002000</tt></td>
<td class="topAlign">Used to indicate if the widget is under the
mouse.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_NoChange</tt></td>
<td class="topAlign"><tt>0x00000010</tt></td>
<td class="topAlign">Used to indicate a tri-state checkbox.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Off</tt></td>
<td class="topAlign"><tt>0x00000008</tt></td>
<td class="topAlign">Used to indicate if the widget is not
checked.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_On</tt></td>
<td class="topAlign"><tt>0x00000020</tt></td>
<td class="topAlign">Used to indicate if the widget is
checked.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Raised</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">Used to indicate if a button is raised.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_ReadOnly</tt></td>
<td class="topAlign"><tt>0x02000000</tt></td>
<td class="topAlign">Used to indicate if a widget is
read-only.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Selected</tt></td>
<td class="topAlign"><tt>0x00008000</tt></td>
<td class="topAlign">Used to indicate if a widget is selected.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Item</tt></td>
<td class="topAlign"><tt>0x00100000</tt></td>
<td class="topAlign">Used by item views to indicate if a horizontal
branch should be drawn.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Open</tt></td>
<td class="topAlign"><tt>0x00040000</tt></td>
<td class="topAlign">Used by item views to indicate if the tree
branch is open.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Sibling</tt></td>
<td class="topAlign"><tt>0x00200000</tt></td>
<td class="topAlign">Used by item views to indicate if a vertical
line needs to be drawn (for siblings).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Sunken</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">Used to indicate if the widget is sunken or
pressed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_UpArrow</tt></td>
<td class="topAlign"><tt>0x00004000</tt></td>
<td class="topAlign">Used to indicate if an up arrow should be
visible on the widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Mini</tt></td>
<td class="topAlign"><tt>0x08000000</tt></td>
<td class="topAlign">Used to indicate a mini style Mac widget or
button.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.State_Small</tt></td>
<td class="topAlign"><tt>0x04000000</tt></td>
<td class="topAlign">Used to indicate a small style Mac widget or
button.</td>
</tr>
</table>
<p>The State type is a typedef for <a href="qflags.html">QFlags</a>&lt;StateFlag&gt;. It stores an OR
combination of StateFlag values.</p>
<p><b>See also</b> <a href="qstyle.html#drawPrimitive">drawPrimitive</a>().</p>


<h3 class="fn"><a name="StyleHint-enum" />QStyle.StyleHint</h3><p>This enum describes the available style hints. A style hint is a
general look and/or feel hint.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_EtchDisabledText</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Disabled text is "etched" as it is on
Windows.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_DitherDisabledText</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Disabled text is dithered as it is on
Motif.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_GUIStyle</tt></td>
<td class="topAlign"><tt>0x00000100</tt></td>
<td class="topAlign">The GUI style to use.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_ScrollBar_ContextMenu</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Whether or not a scroll bar has a context
menu.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ScrollBar_MiddleClickAbsolutePosition</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">A boolean value. If true, middle clicking on a
scroll bar causes the slider to jump to that position. If false,
middle clicking is ignored.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ScrollBar_LeftClickAbsolutePosition</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">A boolean value. If true, left clicking on a
scroll bar causes the slider to jump to that position. If false,
left clicking will behave as appropriate for each control.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ScrollBar_ScrollWhenPointerLeavesControl</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">A boolean value. If true, when clicking a
scroll bar <a href="qstyle.html#SubControl-enum">SubControl</a>,
holding the mouse button down and moving the pointer outside the
<a href="qstyle.html#SubControl-enum">SubControl</a>, the scroll
bar continues to scroll. If false, the scollbar stops scrolling
when the pointer leaves the <a href="qstyle.html#SubControl-enum">SubControl</a>.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ScrollBar_RollBetweenButtons</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">A boolean value. If true, when clicking a
scroll bar button (<a href="qstyle.html#SubControl-enum">SC_ScrollBarAddLine</a> or <a href="qstyle.html#SubControl-enum">SC_ScrollBarSubLine</a>) and dragging
over to the opposite button (rolling) will press the new button and
release the old one. When it is false, the original button is
released and nothing happens (like a push button).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_TabBar_Alignment</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">The alignment for tabs in a <a href="qtabwidget.html">QTabWidget</a>. Possible values are <a href="qt.html#AlignmentFlag-enum">Qt.AlignLeft</a>, <a href="qt.html#AlignmentFlag-enum">Qt.AlignCenter</a> and <a href="qt.html#AlignmentFlag-enum">Qt.AlignRight</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Header_ArrowAlignment</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">The placement of the sorting indicator may
appear in list or table headers. Possible values are <a class="compat" href="qt-qt3.html#Dock-enum">Qt.Left</a> or <a class="compat" href="qt-qt3.html#Dock-enum">Qt.Right</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Slider_SnapToValue</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">Sliders snap to values while moving, as they
do on Windows.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_Slider_SloppyKeyEvents</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">Key presses handled in a sloppy manner, i.e.,
left on a vertical slider subtracts a line.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ProgressDialog_CenterCancelButton</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">Center button on progress dialogs, like Motif,
otherwise right aligned.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ProgressDialog_TextLabelAlignment</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">The alignment for text labels in progress
dialogs; <a href="qt.html#AlignmentFlag-enum">Qt.AlignCenter</a>
on Windows, <a href="qt.html#AlignmentFlag-enum">Qt.AlignVCenter</a> otherwise.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_PrintDialog_RightAlignButtons</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">Right align buttons in the print dialog, as
done on Windows.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_MainWindow_SpaceBelowMenuBar</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">One or two pixel space between the menu bar
and the dockarea, as done on Windows.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_FontDialog_SelectAssociatedText</tt></td>
<td class="topAlign"><tt>13</tt></td>
<td class="topAlign">Select the text in the line edit, or when
selecting an item from the listbox, or when the line edit receives
focus, as done on Windows.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Menu_KeyboardSearch</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Typing causes a menu to be search for relevant
items, otherwise only mnemnonic is considered.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_Menu_AllowActiveAndDisabled</tt></td>
<td class="topAlign"><tt>14</tt></td>
<td class="topAlign">Allows disabled menu items to be active.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_Menu_SpaceActivatesItem</tt></td>
<td class="topAlign"><tt>15</tt></td>
<td class="topAlign">Pressing the space bar activates the item, as
done on Motif.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_Menu_SubMenuPopupDelay</tt></td>
<td class="topAlign"><tt>16</tt></td>
<td class="topAlign">The number of milliseconds to wait before
opening a submenu (256 on Windows, 96 on Motif).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Menu_Scrollable</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Whether popup menus must support
scrolling.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Menu_SloppySubMenus</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Whether popup menus must support the user
moving the mouse cursor to a submenu while crossing other items of
the menu. This is supported on most modern desktop platforms.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ScrollView_FrameOnlyAroundContents</tt></td>
<td class="topAlign"><tt>17</tt></td>
<td class="topAlign">Whether scrollviews draw their frame only
around contents (like Motif), or around contents, scroll bars and
corner widgets (like Windows).</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_MenuBar_AltKeyNavigation</tt></td>
<td class="topAlign"><tt>18</tt></td>
<td class="topAlign">Menu bars items are navigable by pressing Alt,
followed by using the arrow keys to select the desired item.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ComboBox_ListMouseTracking</tt></td>
<td class="topAlign"><tt>19</tt></td>
<td class="topAlign">Mouse tracking in combobox drop-down
lists.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Menu_MouseTracking</tt></td>
<td class="topAlign"><tt>20</tt></td>
<td class="topAlign">Mouse tracking in popup menus.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_MenuBar_MouseTracking</tt></td>
<td class="topAlign"><tt>21</tt></td>
<td class="topAlign">Mouse tracking in menu bars.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_Menu_FillScreenWithScroll</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Whether scrolling popups should fill the
screen as they are scrolled.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Menu_SelectionWrap</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Whether popups should allow the selections to
wrap, that is when selection should the next item be the first
item.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ItemView_ChangeHighlightOnFocus</tt></td>
<td class="topAlign"><tt>22</tt></td>
<td class="topAlign">Gray out selected items when losing
focus.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_Widget_ShareActivation</tt></td>
<td class="topAlign"><tt>23</tt></td>
<td class="topAlign">Turn on sharing activation with floating
modeless dialogs.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_TabBar_SelectMouseType</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">Which type of mouse event should cause a tab
to be selected.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_Q3ListViewExpand_SelectMouseType</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Which type of mouse event should cause a list
view expansion to be selected.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_TabBar_PreferNoArrows</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Whether a tab bar should suggest a size to
prevent scoll arrows.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_ComboBox_Popup</tt></td>
<td class="topAlign"><tt>25</tt></td>
<td class="topAlign">Allows popups as a combobox drop-down
menu.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_Workspace_FillSpaceOnMaximize</tt></td>
<td class="topAlign"><tt>24</tt></td>
<td class="topAlign">The workspace should maximize the client
area.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_TitleBar_NoBorder</tt></td>
<td class="topAlign"><tt>26</tt></td>
<td class="topAlign">The title bar has no border.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ScrollBar_StopMouseOverSlider</tt></td>
<td class="topAlign"><tt>SH_Slider_StopMouseOverSlider</tt></td>
<td class="topAlign">Obsolete. Use SH_Slider_StopMouseOverSlider
instead.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_Slider_StopMouseOverSlider</tt></td>
<td class="topAlign"><tt>27</tt></td>
<td class="topAlign">Stops auto-repeat when the slider reaches the
mouse position.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_BlinkCursorWhenTextSelected</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Whether cursor should blink when text is
selected.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_RichText_FullWidthSelection</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Whether richtext selections should extend to
the full width of the document.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_GroupBox_TextLabelVerticalAlignment</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">How to vertically align a group box's text
label.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_GroupBox_TextLabelColor</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">How to paint a group box's text label.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_DialogButtons_DefaultButton</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Which button gets the default status in a
dialog's button widget.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ToolBox_SelectedPageTitleBold</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Boldness of the selected page title in a
<a href="qtoolbox.html">QToolBox</a>.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_LineEdit_PasswordCharacter</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The Unicode character to be used for
passwords.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Table_GridLineColor</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The RGB value of the grid for a table.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_UnderlineShortcut</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Whether shortcuts are underlined.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_SpellCheckUnderlineStyle</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">A <a href="qtextcharformat.html#UnderlineStyle-enum">QTextCharFormat.UnderlineStyle</a>
value that specifies the way misspelled words should be
underlined.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_SpinBox_AnimateButton</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Animate a click when up or down is pressed in
a spin box.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_SpinBox_KeyPressAutoRepeatRate</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Auto-repeat interval for spinbox key
presses.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_SpinBox_ClickAutoRepeatRate</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Auto-repeat interval for spinbox mouse
clicks.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_SpinBox_ClickAutoRepeatThreshold</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Auto-repeat threshold for spinbox mouse
clicks.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_ToolTipLabel_Opacity</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">An integer indicating the opacity for the tip
label, 0 is completely transparent, 255 is completely opaque.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_DrawMenuBarSeparator</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Indicates whether or not the menu bar draws
separators.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_TitleBar_ModifyNotification</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Indicates if the title bar should show a '*'
for windows that are modified.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Button_FocusPolicy</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The default focus policy for buttons.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_CustomBase</tt></td>
<td class="topAlign"><tt>0xf0000000</tt></td>
<td class="topAlign">Base value for custom style hints. Custom
values must be greater than this value.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_MenuBar_DismissOnSecondClick</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">A boolean indicating if a menu in the menu bar
should be dismissed when it is clicked on a second time. (Example:
Clicking and releasing on the File Menu in a menu bar and then
immediately clicking on the File Menu again.)</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_MessageBox_UseBorderForButtonSpacing</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">A boolean indicating what the to use the
border of the buttons (computed as half the button height) for the
spacing of the button in a message box.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_MessageBox_CenterButtons</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">A boolean indicating whether the buttons in
the message box should be centered or not (see
QDialogButtonBox.setCentered()).</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_MessageBox_TextInteractionFlags</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">A boolean indicating if the text in a message
box should allow user interfactions (e.g. selection) or not.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_TitleBar_AutoRaise</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">A boolean indicating whether controls on a
title bar ought to update when the mouse is over them.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_ToolButton_PopupDelay</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">An int indicating the popup delay in
milliseconds for menus attached to tool buttons.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_FocusFrame_Mask</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The mask of the focus frame.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_RubberBand_Mask</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The mask of the rubber band.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_WindowFrame_Mask</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The mask of the window frame.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_SpinControls_DisableOnBounds</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Determines if the spin controls will shown as
disabled when reaching the spin range boundary.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Dial_BackgroundRole</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Defines the style's preferred background role
(as <a href="qpalette.html#ColorRole-enum">QPalette.ColorRole</a>)
for a dial widget.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ScrollBar_BackgroundMode</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The background mode for a scroll bar.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ComboBox_LayoutDirection</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The layout direction for the combo box. By
default it should be the same as indicated by the <a href="qstyleoption.html#direction-var">QStyleOption.direction</a>
variable.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ItemView_EllipsisLocation</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The location where ellipses should be added
for item text that is too long to fit in an view item.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ItemView_ShowDecorationSelected</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">When an item in an item view is selected, also
highlight the branch or other decoration.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ItemView_ActivateItemOnSingleClick</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Emit the activated signal when the user single
clicks on an item in an item in an item view. Otherwise the signal
is emitted when the user double clicks on an item.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_Slider_AbsoluteSetButtons</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Which mouse buttons cause a slider to set the
value to the position clicked on.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Slider_PageSetButtons</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Which mouse buttons cause a slider to page
step the value.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_TabBar_ElideMode</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The default eliding style for a tab bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_DialogButtonLayout</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Controls how buttons are laid out in a
<a href="qdialogbuttonbox.html">QDialogButtonBox</a>, returns a
<a href="qdialogbuttonbox.html#ButtonLayout-enum">QDialogButtonBox.ButtonLayout</a>
enum.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_WizardStyle</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Controls the look and feel of a <a href="qwizard.html">QWizard</a>. Returns a <a href="qwizard.html#WizardStyle-enum">QWizard.WizardStyle</a> enum.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_FormLayoutWrapPolicy</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Provides a default for how rows are wrapped in
a <a href="qformlayout.html">QFormLayout</a>. Returns a <a href="qformlayout.html#RowWrapPolicy-enum">QFormLayout.RowWrapPolicy</a>
enum.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_FormLayoutFieldGrowthPolicy</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Provides a default for how fields can grow in
a <a href="qformlayout.html">QFormLayout</a>. Returns a <a href="qformlayout.html#FieldGrowthPolicy-enum">QFormLayout.FieldGrowthPolicy</a>
enum.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_FormLayoutFormAlignment</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Provides a default for how a <a href="qformlayout.html">QFormLayout</a> aligns its contents within the
available space. Returns a <a href="qt.html#AlignmentFlag-enum">Qt.Alignment</a> enum.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_FormLayoutLabelAlignment</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Provides a default for how a <a href="qformlayout.html">QFormLayout</a> aligns labels within the
available space. Returns a <a href="qt.html#AlignmentFlag-enum">Qt.Alignment</a> enum.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ItemView_ArrowKeysNavigateIntoChildren</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Controls whether the tree view will select the
first child when it is exapanded and the right arrow key is
pressed.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ComboBox_PopupFrameStyle</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The frame style used when drawing a combobox
popup menu.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_DialogButtonBox_ButtonsHaveIcons</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Indicates whether or not StandardButtons in
<a href="qdialogbuttonbox.html">QDialogButtonBox</a> should have
icons or not.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ItemView_MovementWithoutUpdatingSelection</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The item view is able to indicate a current
item without changing the selection.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_ToolTip_Mask</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The mask of a tool tip.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_FocusFrame_AboveWidget</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The FocusFrame is stacked above the widget
that it is "focusing on".</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_TextControl_FocusIndicatorTextCharFormat</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Specifies the text format used to highlight
focused anchors in rich text documents displayed for example in
<a href="qtextbrowser.html">QTextBrowser</a>. The format has to be
a <a href="qtextcharformat.html">QTextCharFormat</a> returned in
the variant of the <a href="qstylehintreturnvariant.html">QStyleHintReturnVariant</a> return
value. The <a href="qtextformat.html#Property-enum">QTextFormat.OutlinePen</a>
property is used for the outline and <a href="qtextformat.html#Property-enum">QTextFormat.BackgroundBrush</a>
for the background of the highlighted area.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_Menu_FlashTriggeredItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Flash triggered item.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Menu_FadeOutOnHide</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Fade out the menu instead of hiding it
immediately.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_TabWidget_DefaultTabPosition</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Default position of the tab bar in a tab
widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_ToolBar_Movable</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Determines if the tool bar is movable by
default.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ItemView_PaintAlternatingRowColorsForEmptyArea</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Whether <a href="qtreeview.html">QTreeView</a>
paints alternating row colors for the area that does not have any
items.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_Menu_Mask</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The mask for a popup menu.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_ItemView_DrawDelegateFrame</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Determines if there should be a frame for a
delegate widget.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_TabBar_CloseButtonPosition</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Determines the position of the close button on
a tab in a tab bar.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_DockWidget_ButtonsHaveFrame</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Determines if dockwidget buttons should have
frames. Default is true.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SH_ToolButtonStyle</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Determines the default system style for tool
buttons that uses <a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonFollowStyle</a>.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SH_RequestSoftwareInputPanel</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Determines when a software input panel should
be requested by input widgets. Returns an enum of type <a href="qstyle.html#RequestSoftwareInputPanel-enum">QStyle.RequestSoftwareInputPanel</a>.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#styleHint">styleHint</a>().</p>


<h3 class="fn"><a name="SubControl-enum" />QStyle.SubControl</h3><p>This enum describes the available sub controls. A subcontrol is
a control element within a complex control (<a href="qstyle.html#ComplexControl-enum">ComplexControl</a>).</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_None</tt></td>
<td class="topAlign"><tt>0x00000000</tt></td>
<td class="topAlign">Special value that matches no other sub
control.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ScrollBarAddLine</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">Scroll bar add line (i.e., down/right arrow);
see also <a href="qscrollbar.html">QScrollBar</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ScrollBarSubLine</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">Scroll bar sub line (i.e., up/left
arrow).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ScrollBarAddPage</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">Scroll bar add page (i.e., page down).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ScrollBarSubPage</tt></td>
<td class="topAlign"><tt>0x00000008</tt></td>
<td class="topAlign">Scroll bar sub page (i.e., page up).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ScrollBarFirst</tt></td>
<td class="topAlign"><tt>0x00000010</tt></td>
<td class="topAlign">Scroll bar first line (i.e., home).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ScrollBarLast</tt></td>
<td class="topAlign"><tt>0x00000020</tt></td>
<td class="topAlign">Scroll bar last line (i.e., end).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ScrollBarSlider</tt></td>
<td class="topAlign"><tt>0x00000040</tt></td>
<td class="topAlign">Scroll bar slider handle.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ScrollBarGroove</tt></td>
<td class="topAlign"><tt>0x00000080</tt></td>
<td class="topAlign">Special sub-control which contains the area in
which the slider handle may move.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_SpinBoxUp</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">Spin widget up/increase; see also <a href="qspinbox.html">QSpinBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_SpinBoxDown</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">Spin widget down/decrease.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_SpinBoxFrame</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">Spin widget frame.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_SpinBoxEditField</tt></td>
<td class="topAlign"><tt>0x00000008</tt></td>
<td class="topAlign">Spin widget edit field.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ComboBoxEditField</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">Combobox edit field; see also <a href="qcombobox.html">QComboBox</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ComboBoxArrow</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">Combobox arrow button.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ComboBoxFrame</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">Combobox frame.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ComboBoxListBoxPopup</tt></td>
<td class="topAlign"><tt>0x00000008</tt></td>
<td class="topAlign">The reference rectangle for the combobox
popup. Used to calculate the position of the popup.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_SliderGroove</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">Special sub-control which contains the area in
which the slider handle may move.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_SliderHandle</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">Slider handle.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_SliderTickmarks</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">Slider tickmarks.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ToolButton</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">Tool button (see also <a href="qtoolbutton.html">QToolButton</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_ToolButtonMenu</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">Sub-control for opening a popup menu in a tool
button; see also <a class="compat" href="q3popupmenu.html">Q3PopupMenu</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_TitleBarSysMenu</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">System menu button (i.e., restore, close,
etc.).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_TitleBarMinButton</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">Minimize button.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_TitleBarMaxButton</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">Maximize button.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_TitleBarCloseButton</tt></td>
<td class="topAlign"><tt>0x00000008</tt></td>
<td class="topAlign">Close button.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_TitleBarLabel</tt></td>
<td class="topAlign"><tt>0x00000100</tt></td>
<td class="topAlign">Window title label.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_TitleBarNormalButton</tt></td>
<td class="topAlign"><tt>0x00000010</tt></td>
<td class="topAlign">Normal (restore) button.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_TitleBarShadeButton</tt></td>
<td class="topAlign"><tt>0x00000020</tt></td>
<td class="topAlign">Shade button.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_TitleBarUnshadeButton</tt></td>
<td class="topAlign"><tt>0x00000040</tt></td>
<td class="topAlign">Unshade button.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SC_TitleBarContextHelpButton</tt></td>
<td class="topAlign"><tt>0x00000080</tt></td>
<td class="topAlign">Context Help button.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_Q3ListView</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">The list view area.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_Q3ListViewExpand</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">Expand item (i.e., show/hide child
items).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_DialHandle</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">The handle of the dial (i.e. what you use to
control the dial).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_DialGroove</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">The groove for the dial.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_DialTickmarks</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">The tickmarks for the dial.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_GroupBoxFrame</tt></td>
<td class="topAlign"><tt>0x00000008</tt></td>
<td class="topAlign">The frame of a group box.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_GroupBoxLabel</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">The title of a group box.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_GroupBoxCheckBox</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">The optional check box of a group box.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_GroupBoxContents</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">The group box contents.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_MdiNormalButton</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">The normal button for a MDI subwindow in the
menu bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_MdiMinButton</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">The minimize button for a MDI subwindow in the
menu bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_MdiCloseButton</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">The close button for a MDI subwindow in the
menu bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SC_All</tt></td>
<td class="topAlign"><tt>0xffffffff</tt></td>
<td class="topAlign">Special value that matches all
sub-controls.</td>
</tr>
</table>
<p>The SubControls type is a typedef for <a href="qflags.html">QFlags</a>&lt;SubControl&gt;. It stores an OR
combination of SubControl values.</p>
<p><b>See also</b> <a href="qstyle.html#ComplexControl-enum">ComplexControl</a>.</p>


<h3 class="fn"><a name="SubElement-enum" />QStyle.SubElement</h3><p>This enum represents a sub-area of a widget. Style
implementations use these areas to draw the different parts of a
widget.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_PushButtonContents</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Area containing the label (icon with text or
pixmap).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_PushButtonFocusRect</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Area for the focus rect (usually larger than
the contents rect).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_PushButtonLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_CheckBoxIndicator</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Area for the state indicator (e.g., check
mark).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_CheckBoxContents</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">Area for the label (text or pixmap).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_CheckBoxFocusRect</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">Area for the focus indicator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_CheckBoxClickRect</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">Clickable area, defaults to
SE_CheckBoxFocusRect.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_CheckBoxLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SE_DateTimeEditLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_RadioButtonIndicator</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">Area for the state indicator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_RadioButtonContents</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">Area for the label.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_RadioButtonFocusRect</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">Area for the focus indicator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_RadioButtonClickRect</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">Clickable area, defaults to
SE_RadioButtonFocusRect.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_RadioButtonLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ComboBoxFocusRect</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">Area for the focus indicator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_SliderFocusRect</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">Area for the focus indicator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_SliderLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_SpinBoxLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SE_Q3DockWindowHandleRect</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">Area for the tear-off handle.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ProgressBarGroove</tt></td>
<td class="topAlign"><tt>13</tt></td>
<td class="topAlign">Area for the groove.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ProgressBarContents</tt></td>
<td class="topAlign"><tt>14</tt></td>
<td class="topAlign">Area for the progress indicator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ProgressBarLabel</tt></td>
<td class="topAlign"><tt>15</tt></td>
<td class="topAlign">Area for the text label.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ProgressBarLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_FrameContents</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for a frame's contents.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ShapedFrameContents</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for a frame's contents using the shape in
<a href="qstyleoptionframev3.html">QStyleOptionFrameV3</a>; see
<a href="qframe.html">QFrame</a></td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_FrameLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_HeaderArrow</tt></td>
<td class="topAlign"><tt>27</tt></td>
<td class="topAlign">Area for the sort indicator for a header.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_HeaderLabel</tt></td>
<td class="topAlign"><tt>26</tt></td>
<td class="topAlign">Area for the label in a header.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_LabelLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_LineEditContents</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for a line edit's contents.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_TabWidgetLeftCorner</tt></td>
<td class="topAlign"><tt>31</tt></td>
<td class="topAlign">Area for the left corner widget in a tab
widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_TabWidgetRightCorner</tt></td>
<td class="topAlign"><tt>32</tt></td>
<td class="topAlign">Area for the right corner widget in a tab
widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_TabWidgetTabBar</tt></td>
<td class="topAlign"><tt>28</tt></td>
<td class="topAlign">Area for the tab bar widget in a tab
widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_TabWidgetTabContents</tt></td>
<td class="topAlign"><tt>30</tt></td>
<td class="topAlign">Area for the contents of the tab widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_TabWidgetTabPane</tt></td>
<td class="topAlign"><tt>29</tt></td>
<td class="topAlign">Area for the pane of a tab widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_TabWidgetLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ToolBoxTabContents</tt></td>
<td class="topAlign"><tt>25</tt></td>
<td class="topAlign">Area for a toolbox tab's icon and label.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ToolButtonLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SE_ItemViewItemCheckIndicator</tt></td>
<td class="topAlign"><tt>SE_ViewItemCheckIndicator</tt></td>
<td class="topAlign">Area for a view item's check mark.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_TabBarTearIndicator</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for the tear indicator on a tab bar with
scroll arrows.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SE_TreeViewDisclosureItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for the actual disclosure item in a tree
branch.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SE_DialogButtonBoxLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_GroupBoxLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_CustomBase</tt></td>
<td class="topAlign"><tt>0xf0000000</tt></td>
<td class="topAlign">Base value for custom sub-elements. Custom
values must be greater than this value.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_DockWidgetFloatButton</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The float button of a dock widget.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SE_DockWidgetTitleBarText</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The text bounds of the dock widgets
title.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_DockWidgetCloseButton</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The close button of a dock widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_DockWidgetIcon</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">The icon of a dock widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ComboBoxLayoutItem</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area that counts for the parent layout.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QStyle.SE_ItemViewItemDecoration</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for a view item's decoration (icon).</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ItemViewItemText</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for a view item's text.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ItemViewItemFocusRect</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for a view item's focus rect.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_TabBarTabLeftButton</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for a widget on the left side of a tab in
a tab bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_TabBarTabRightButton</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for a widget on the right side of a tab
in a tab bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_TabBarTabText</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for the text on a tab in a tab bar.</td>
</tr>
<tr>
<td class="topAlign"><tt>QStyle.SE_ToolBarHandle</tt></td>
<td class="topAlign">?</td>
<td class="topAlign">Area for the handle of a tool bar.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#subElementRect">subElementRect</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QStyle" />QStyle.__init__ (<i>self</i>)</h3><p>Constructs a style object.</p>


<h3 class="fn"><a name="alignedRect" /><a href="qrect.html">QRect</a> QStyle.alignedRect (<a href="qt.html#LayoutDirection-enum">Qt.LayoutDirection</a>&#160;<i>direction</i>, <a href="qt-alignment.html">Qt.Alignment</a>&#160;<i>alignment</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>, <a href="qrect.html">QRect</a>&#160;<i>rectangle</i>)</h3><p>Returns a new rectangle of the specified <i>size</i> that is
aligned to the given <i>rectangle</i> according to the specified
<i>alignment</i> and <i>direction</i>.</p>


<h3 class="fn"><a name="combinedLayoutSpacing" />int QStyle.combinedLayoutSpacing (<i>self</i>, <a href="qsizepolicy-controltypes.html">QSizePolicy.ControlTypes</a>&#160;<i>controls1</i>, <a href="qsizepolicy-controltypes.html">QSizePolicy.ControlTypes</a>&#160;<i>controls2</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>option</i>&#160;=&#160;None, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>Returns the spacing that should be used between <i>controls1</i>
and <i>controls2</i> in a layout. <i>orientation</i> specifies
whether the controls are laid out side by side or stacked
vertically. The <i>option</i> parameter can be used to pass extra
information about the parent widget. The <i>widget</i> parameter is
optional and can also be used if <i>option</i> is 0.</p>
<p><i>controls1</i> and <i>controls2</i> are OR-combination of zero
or more <a href="qsizepolicy.html#ControlType-enum">control
types</a>.</p>
<p>This function is called by the layout system. It is used only if
<a href="qstyle.html#PixelMetric-enum">PM_LayoutHorizontalSpacing</a> or
<a href="qstyle.html#PixelMetric-enum">PM_LayoutVerticalSpacing</a>
returns a negative value.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qstyle.html#layoutSpacing">layoutSpacing</a>() and <a href="qstyle.html#layoutSpacingImplementation">layoutSpacingImplementation</a>().</p>


<h3 class="fn"><a name="drawComplexControl" />QStyle.drawComplexControl (<i>self</i>, <a href="qstyle.html#ComplexControl-enum">ComplexControl</a>&#160;<i>cc</i>, <a href="qstyleoptioncomplex.html">QStyleOptionComplex</a>&#160;<i>opt</i>, <a href="qpainter.html">QPainter</a>&#160;<i>p</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Draws the given <i>control</i> using the provided <i>painter</i>
with the style options specified by <i>option</i>.</p>
<p>The <i>widget</i> argument is optional and can be used as aid in
drawing the control.</p>
<p>The <i>option</i> parameter is a pointer to a <a href="qstyleoptioncomplex.html">QStyleOptionComplex</a> object that can
be cast to the correct subclass using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>()
function. Note that the <tt>rect</tt> member of the specified
<i>option</i> must be in logical coordinates. Reimplementations of
this function should use <a href="qstyle.html#visualRect">visualRect</a>() to change the logical
coordinates into screen coordinates before calling the <a href="qstyle.html#drawPrimitive">drawPrimitive</a>() or <a href="qstyle.html#drawControl">drawControl</a>() function.</p>
<p>The table below is listing the complex control elements and
their associated style option subclass. The style options contain
all the parameters required to draw the controls, including
<a href="qstyleoption.html#state-var">QStyleOption.state</a> which
holds the <a href="qstyle.html#StateFlag-enum">style flags</a> that
are used when drawing. The table also describes which flags that
are set when casting the given <i>option</i> to the appropriate
subclass.</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Complex Control</th>
<th><a href="qstyleoptioncomplex.html">QStyleOptionComplex</a>
Subclass</th>
<th>Style Flag</th>
<th>Remark</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td rowspan="2"><a href="qstyle.html#ComplexControl-enum">CC_SpinBox</a></td>
<td rowspan="2"><a href="qstyleoptionspinbox.html">QStyleOptionSpinBox</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the spin box is enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the spin box has input focus.</td>
</tr>
<tr class="odd" valign="top">
<td rowspan="2"><a href="qstyle.html#ComplexControl-enum">CC_ComboBox</a></td>
<td rowspan="2"><a href="qstyleoptioncombobox.html">QStyleOptionComboBox</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the combobox is enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the combobox has input focus.</td>
</tr>
<tr class="odd" valign="top">
<td rowspan="2"><a href="qstyle.html#ComplexControl-enum">CC_ScrollBar</a></td>
<td rowspan="2"><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the scroll bar is enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the scroll bar has input focus.</td>
</tr>
<tr class="odd" valign="top">
<td rowspan="2"><a href="qstyle.html#ComplexControl-enum">CC_Slider</a></td>
<td rowspan="2"><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the slider is enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the slider has input focus.</td>
</tr>
<tr class="odd" valign="top">
<td rowspan="2"><a href="qstyle.html#ComplexControl-enum">CC_Dial</a></td>
<td rowspan="2"><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the dial is enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the dial has input focus.</td>
</tr>
<tr class="odd" valign="top">
<td rowspan="6"><a href="qstyle.html#ComplexControl-enum">CC_ToolButton</a></td>
<td rowspan="6"><a href="qstyleoptiontoolbutton.html">QStyleOptionToolButton</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the tool button is enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the tool button has input focus.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_DownArrow</a></td>
<td>Set if the tool button is down (i.e., a mouse button or the
space bar is pressed).</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_On</a></td>
<td>Set if the tool button is a toggle button and is toggled
on.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_AutoRaise</a></td>
<td>Set if the tool button has auto-raise enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Raised</a></td>
<td>Set if the button is not down, not on, and doesn't contain the
mouse when auto-raise is enabled.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#ComplexControl-enum">CC_TitleBar</a></td>
<td><a href="qstyleoptiontitlebar.html">QStyleOptionTitleBar</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the title bar is enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#ComplexControl-enum">CC_Q3ListView</a></td>
<td><a href="qstyleoptionq3listview.html">QStyleOptionQ3ListView</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the list view is enabled.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#drawPrimitive">drawPrimitive</a>() and <a href="qstyle.html#drawControl">drawControl</a>().</p>


<h3 class="fn"><a name="drawControl" />QStyle.drawControl (<i>self</i>, <a href="qstyle.html#ControlElement-enum">ControlElement</a>&#160;<i>element</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>opt</i>, <a href="qpainter.html">QPainter</a>&#160;<i>p</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Draws the given <i>element</i> with the provided <i>painter</i>
with the style options specified by <i>option</i>.</p>
<p>The <i>widget</i> argument is optional and can be used as aid in
drawing the control. The <i>option</i> parameter is a pointer to a
<a href="qstyleoption.html">QStyleOption</a> object that can be
cast to the correct subclass using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>()
function.</p>
<p>The table below is listing the control elements and their
associated style option subclass. The style options contain all the
parameters required to draw the controls, including <a href="qstyleoption.html#state-var">QStyleOption.state</a> which holds
the style flags that are used when drawing. The table also
describes which flags that are set when casting the given option to
the appropriate subclass.</p>
<p>Note that if a control element is not listed here, it is because
it uses a plain <a href="qstyleoption.html">QStyleOption</a>
object.</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Control Element</th>
<th><a href="qstyleoption.html">QStyleOption</a> Subclass</th>
<th>Style Flag</th>
<th>Remark</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td rowspan="5"><a href="qstyle.html#ControlElement-enum">CE_MenuItem</a>, <a href="qstyle.html#ControlElement-enum">CE_MenuBarItem</a></td>
<td rowspan="5"><a href="qstyleoptionmenuitem.html">QStyleOptionMenuItem</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Selected</a></td>
<td>The menu item is currently selected item.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>The item is enabled.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_DownArrow</a></td>
<td>Indicates that a scroll down arrow should be drawn.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_UpArrow</a></td>
<td>Indicates that a scroll up arrow should be drawn</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the menu bar has input focus.</td>
</tr>
<tr class="even" valign="top">
<td rowspan="5"><a href="qstyle.html#ControlElement-enum">CE_PushButton</a>, <a href="qstyle.html#ControlElement-enum">CE_PushButtonBevel</a>, <a href="qstyle.html#ControlElement-enum">CE_PushButtonLabel</a></td>
<td rowspan="5"><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the button is enabled.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the button has input focus.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Raised</a></td>
<td>Set if the button is not down, not on and not flat.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_On</a></td>
<td>Set if the button is a toggle button and is toggled on.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td>
<td>Set if the button is down (i.e., the mouse button or the space
bar is pressed on the button).</td>
</tr>
<tr class="odd" valign="top">
<td rowspan="6"><a href="qstyle.html#ControlElement-enum">CE_RadioButton</a>, <a href="qstyle.html#ControlElement-enum">CE_RadioButtonLabel</a>, <a href="qstyle.html#ControlElement-enum">CE_CheckBox</a>, <a href="qstyle.html#ControlElement-enum">CE_CheckBoxLabel</a></td>
<td rowspan="6"><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the button is enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the button has input focus.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_On</a></td>
<td>Set if the button is checked.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Off</a></td>
<td>Set if the button is not checked.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_NoChange</a></td>
<td>Set if the button is in the NoChange state.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td>
<td>Set if the button is down (i.e., the mouse button or the space
bar is pressed on the button).</td>
</tr>
<tr class="odd" valign="top">
<td rowspan="2"><a href="qstyle.html#ControlElement-enum">CE_ProgressBarContents</a>,
<a href="qstyle.html#ControlElement-enum">CE_ProgressBarLabel</a>,
<a href="qstyle.html#ControlElement-enum">CE_ProgressBarGroove</a></td>
<td rowspan="2"><a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the progress bar is enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the progress bar has input focus.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#ControlElement-enum">CE_Header</a>,
<a href="qstyle.html#ControlElement-enum">CE_HeaderSection</a>,
<a href="qstyle.html#ControlElement-enum">CE_HeaderLabel</a></td>
<td><a href="qstyleoptionheader.html">QStyleOptionHeader</a></td>
<td />
<td />
</tr>
<tr class="even" valign="top">
<td rowspan="3"><a href="qstyle.html#ControlElement-enum">CE_TabBarTab</a>, <a href="qstyle.html#ControlElement-enum">CE_TabBarTabShape</a>, <a href="qstyle.html#ControlElement-enum">CE_TabBarTabLabel</a></td>
<td rowspan="3"><a href="qstyleoptiontab.html">QStyleOptionTab</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the tab bar is enabled.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Selected</a></td>
<td>The tab bar is the currently selected tab bar.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the tab bar tab has input focus.</td>
</tr>
<tr class="odd" valign="top">
<td rowspan="7"><a href="qstyle.html#ControlElement-enum">CE_ToolButtonLabel</a></td>
<td rowspan="7"><a href="qstyleoptiontoolbutton.html">QStyleOptionToolButton</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the tool button is enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the tool button has input focus.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td>
<td>Set if the tool button is down (i.e., a mouse button or the
space bar is pressed).</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_On</a></td>
<td>Set if the tool button is a toggle button and is toggled
on.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_AutoRaise</a></td>
<td>Set if the tool button has auto-raise enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_MouseOver</a></td>
<td>Set if the mouse pointer is over the tool button.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Raised</a></td>
<td>Set if the button is not down and is not on.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#ControlElement-enum">CE_ToolBoxTab</a></td>
<td><a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Selected</a></td>
<td>The tab is the currently selected tab.</td>
</tr>
<tr class="odd" valign="top">
<td rowspan="3"><a href="qstyle.html#ControlElement-enum">CE_HeaderSection</a></td>
<td rowspan="3"><a href="qstyleoptionheader.html">QStyleOptionHeader</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td>
<td>Indicates that the section is pressed.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_UpArrow</a></td>
<td>Indicates that the sort indicator should be pointing up.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_DownArrow</a></td>
<td>Indicates that the sort indicator should be pointing down.</td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#drawPrimitive">drawPrimitive</a>() and <a href="qstyle.html#drawComplexControl">drawComplexControl</a>().</p>


<h3 class="fn"><a name="drawItemPixmap" />QStyle.drawItemPixmap (<i>self</i>, <a href="qpainter.html">QPainter</a>&#160;<i>painter</i>, <a href="qrect.html">QRect</a>&#160;<i>rect</i>, int&#160;<i>alignment</i>, <a href="qpixmap.html">QPixmap</a>&#160;<i>pixmap</i>)</h3><p>Draws the given <i>pixmap</i> in the specified <i>rectangle</i>,
according to the specified <i>alignment</i>, using the provided
<i>painter</i>.</p>
<p><b>See also</b> <a href="qstyle.html#drawItemText">drawItemText</a>().</p>


<h3 class="fn"><a name="drawItemText" />QStyle.drawItemText (<i>self</i>, <a href="qpainter.html">QPainter</a>&#160;<i>painter</i>, <a href="qrect.html">QRect</a>&#160;<i>rectangle</i>, int&#160;<i>alignment</i>, <a href="qpalette.html">QPalette</a>&#160;<i>palette</i>, bool&#160;<i>enabled</i>, QString&#160;<i>text</i>, <a href="qpalette.html#ColorRole-enum">QPalette.ColorRole</a>&#160;<i>textRole</i>&#160;=&#160;QPalette.NoRole)</h3><p>Draws the given <i>text</i> in the specified <i>rectangle</i>
using the provided <i>painter</i> and <i>palette</i>.</p>
<p>The text is drawn using the painter's pen, and aligned and
wrapped according to the specified <i>alignment</i>. If an explicit
<i>textRole</i> is specified, the text is drawn using the
<i>palette</i>'s color for the given role. The <i>enabled</i>
parameter indicates whether or not the item is enabled; when
reimplementing this function, the <i>enabled</i> parameter should
influence how the item is drawn.</p>
<p><b>See also</b> <a href="qt.html#AlignmentFlag-enum">Qt.Alignment</a> and <a href="qstyle.html#drawItemPixmap">drawItemPixmap</a>().</p>


<h3 class="fn"><a name="drawPrimitive" />QStyle.drawPrimitive (<i>self</i>, <a href="qstyle.html#PrimitiveElement-enum">PrimitiveElement</a>&#160;<i>pe</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>opt</i>, <a href="qpainter.html">QPainter</a>&#160;<i>p</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Draws the given primitive <i>element</i> with the provided
<i>painter</i> using the style options specified by
<i>option</i>.</p>
<p>The <i>widget</i> argument is optional and may contain a widget
that may aid in drawing the primitive element.</p>
<p>The table below is listing the primitive elements and their
associated style option subclasses. The style options contain all
the parameters required to draw the elements, including <a href="qstyleoption.html#state-var">QStyleOption.state</a> which holds
the style flags that are used when drawing. The table also
describes which flags that are set when casting the given option to
the appropriate subclass.</p>
<p>Note that if a primitive element is not listed here, it is
because it uses a plain <a href="qstyleoption.html">QStyleOption</a> object.</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Primitive Element</th>
<th><a href="qstyleoption.html">QStyleOption</a> Subclass</th>
<th>Style Flag</th>
<th>Remark</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td><a href="qstyle.html#PrimitiveElement-enum">PE_FrameFocusRect</a></td>
<td><a href="qstyleoptionfocusrect.html">QStyleOptionFocusRect</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_FocusAtBorder</a></td>
<td>Whether the focus is is at the border or inside the
widget.</td>
</tr>
<tr class="even" valign="top">
<td rowspan="2"><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorCheckBox</a></td>
<td rowspan="2"><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_NoChange</a></td>
<td>Indicates a "tri-state" checkbox.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_On</a></td>
<td>Indicates the indicator is checked.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorRadioButton</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_On</a></td>
<td>Indicates that a radio button is selected.</td>
</tr>
<tr class="odd" valign="top">
<td rowspan="3"><a href="qstyle.html#PrimitiveElement-enum">PE_Q3CheckListExclusiveIndicator</a>,
<a href="qstyle.html#PrimitiveElement-enum">PE_Q3CheckListIndicator</a></td>
<td rowspan="3"><a href="qstyleoptionq3listview.html">QStyleOptionQ3ListView</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_On</a></td>
<td>Indicates whether or not the controller is selected.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_NoChange</a></td>
<td>Indicates a "tri-state" controller.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Indicates the controller is enabled.</td>
</tr>
<tr class="even" valign="top">
<td rowspan="4"><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorBranch</a></td>
<td rowspan="4"><a href="qstyleoption.html">QStyleOption</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Children</a></td>
<td>Indicates that the control for expanding the tree to show child
items, should be drawn.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Item</a></td>
<td>Indicates that a horizontal branch (to show a child item),
should be drawn.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Open</a></td>
<td>Indicates that the tree branch is expanded.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Sibling</a></td>
<td>Indicates that a vertical line (to show a sibling item), should
be drawn.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorHeaderArrow</a></td>
<td><a href="qstyleoptionheader.html">QStyleOptionHeader</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_UpArrow</a></td>
<td>Indicates that the arrow should be drawn up; otherwise it
should be down.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#PrimitiveElement-enum">PE_FrameGroupBox</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_Frame</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_FrameLineEdit</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_FrameMenu</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_FrameDockWidget</a>,
<a href="qstyle.html#PrimitiveElement-enum">PE_FrameWindow</a></td>
<td><a href="qstyleoptionframe.html">QStyleOptionFrame</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td>
<td>Indicates that the Frame should be sunken.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorToolBarHandle</a></td>
<td><a href="qstyleoption.html">QStyleOption</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Horizontal</a></td>
<td>Indicates that the window handle is horizontal instead of
vertical.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#PrimitiveElement-enum">PE_Q3DockWindowSeparator</a></td>
<td><a href="qstyleoption.html">QStyleOption</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Horizontal</a></td>
<td>Indicates that the separator is horizontal instead of
vertical.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinPlus</a>,
<a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinMinus</a>,
<a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinUp</a>,
<a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinDown</a>,</td>
<td><a href="qstyleoptionspinbox.html">QStyleOptionSpinBox</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td>
<td>Indicates that the button is pressed.</td>
</tr>
<tr class="odd" valign="top">
<td rowspan="5"><a href="qstyle.html#PrimitiveElement-enum">PE_PanelButtonCommand</a></td>
<td rowspan="5"><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
<td><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td>
<td>Set if the button is enabled.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td>
<td>Set if the button has input focus.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Raised</a></td>
<td>Set if the button is not down, not on and not flat.</td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_On</a></td>
<td>Set if the button is a toggle button and is toggled on.</td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td>
<td>Set if the button is down (i.e., the mouse button or the space
bar is pressed on the button).</td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#drawComplexControl">drawComplexControl</a>() and
<a href="qstyle.html#drawControl">drawControl</a>().</p>


<h3 class="fn"><a name="generatedIconPixmap" /><a href="qpixmap.html">QPixmap</a> QStyle.generatedIconPixmap (<i>self</i>, <a href="qicon.html#Mode-enum">QIcon.Mode</a>&#160;<i>iconMode</i>, <a href="qpixmap.html">QPixmap</a>&#160;<i>pixmap</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>opt</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns a copy of the given <i>pixmap</i>, styled to conform to
the specified <i>iconMode</i> and taking into account the palette
specified by <i>option</i>.</p>
<p>The <i>option</i> parameter can pass extra information, but it
must contain a palette.</p>
<p>Note that not all pixmaps will conform, in which case the
returned pixmap is a plain copy.</p>
<p><b>See also</b> <a href="qicon.html">QIcon</a>.</p>


<h3 class="fn"><a name="hitTestComplexControl" /><a href="qstyle.html#SubControl-enum">SubControl</a> QStyle.hitTestComplexControl (<i>self</i>, <a href="qstyle.html#ComplexControl-enum">ComplexControl</a>&#160;<i>cc</i>, <a href="qstyleoptioncomplex.html">QStyleOptionComplex</a>&#160;<i>opt</i>, <a href="qpoint.html">QPoint</a>&#160;<i>pt</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the sub control at the given <i>position</i> in the
given complex <i>control</i> (with the style options specified by
<i>option</i>).</p>
<p>Note that the <i>position</i> is expressed in screen
coordinates.</p>
<p>The <i>option</i> argument is a pointer to a <a href="qstyleoptioncomplex.html">QStyleOptionComplex</a> object (or one
of its subclasses). The object can be cast to the appropriate type
using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>()
function. See <a href="qstyle.html#drawComplexControl">drawComplexControl</a>() for
details. The <i>widget</i> argument is optional and can contain
additional information for the function.</p>
<p><b>See also</b> <a href="qstyle.html#drawComplexControl">drawComplexControl</a>() and
<a href="qstyle.html#subControlRect">subControlRect</a>().</p>


<h3 class="fn"><a name="itemPixmapRect" /><a href="qrect.html">QRect</a> QStyle.itemPixmapRect (<i>self</i>, <a href="qrect.html">QRect</a>&#160;<i>r</i>, int&#160;<i>flags</i>, <a href="qpixmap.html">QPixmap</a>&#160;<i>pixmap</i>)</h3><p>Returns the area within the given <i>rectangle</i> in which to
draw the specified <i>pixmap</i> according to the defined
<i>alignment</i>.</p>


<h3 class="fn"><a name="itemTextRect" /><a href="qrect.html">QRect</a> QStyle.itemTextRect (<i>self</i>, <a href="qfontmetrics.html">QFontMetrics</a>&#160;<i>fm</i>, <a href="qrect.html">QRect</a>&#160;<i>r</i>, int&#160;<i>flags</i>, bool&#160;<i>enabled</i>, QString&#160;<i>text</i>)</h3><p>Returns the area within the given <i>rectangle</i> in which to
draw the provided <i>text</i> according to the specified font
<i>metrics</i> and <i>alignment</i>. The <i>enabled</i> parameter
indicates whether or not the associated item is enabled.</p>
<p>If the given <i>rectangle</i> is larger than the area needed to
render the <i>text</i>, the rectangle that is returned will be
offset within <i>rectangle</i> according to the specified
<i>alignment</i>. For example, if <i>alignment</i> is <a href="qt.html#AlignmentFlag-enum">Qt.AlignCenter</a>, the returned
rectangle will be centered within <i>rectangle</i>. If the given
<i>rectangle</i> is smaller than the area needed, the returned
rectangle will be the smallest rectangle large enough to render the
<i>text</i>.</p>
<p><b>See also</b> <a href="qt.html#AlignmentFlag-enum">Qt.Alignment</a>.</p>


<h3 class="fn"><a name="layoutSpacing" />int QStyle.layoutSpacing (<i>self</i>, <a href="qsizepolicy.html#ControlType-enum">QSizePolicy.ControlType</a>&#160;<i>control1</i>, <a href="qsizepolicy.html#ControlType-enum">QSizePolicy.ControlType</a>&#160;<i>control2</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>option</i>&#160;=&#160;None, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>Returns the spacing that should be used between <i>control1</i>
and <i>control2</i> in a layout. <i>orientation</i> specifies
whether the controls are laid out side by side or stacked
vertically. The <i>option</i> parameter can be used to pass extra
information about the parent widget. The <i>widget</i> parameter is
optional and can also be used if <i>option</i> is 0.</p>
<p>This function is called by the layout system. It is used only if
<a href="qstyle.html#PixelMetric-enum">PM_LayoutHorizontalSpacing</a> or
<a href="qstyle.html#PixelMetric-enum">PM_LayoutVerticalSpacing</a>
returns a negative value.</p>
<p>For binary compatibility reasons, this function is not virtual.
If you want to specify custom layout spacings in a <a href="qstyle.html">QStyle</a> subclass, implement a slot called <a href="qstyle.html#layoutSpacingImplementation">layoutSpacingImplementation</a>().
<a href="qstyle.html">QStyle</a> will discover the slot at run-time
(using Qt's <a href="metaobjects.html#meta-object-system">meta-object system</a>) and
direct all calls to layoutSpacing() to <a href="qstyle.html#layoutSpacingImplementation">layoutSpacingImplementation</a>().</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qstyle.html#combinedLayoutSpacing">combinedLayoutSpacing</a>() and
<a href="qstyle.html#layoutSpacingImplementation">layoutSpacingImplementation</a>().</p>


<h3 class="fn"><a name="layoutSpacingImplementation" />int QStyle.layoutSpacingImplementation (<i>self</i>, <a href="qsizepolicy.html#ControlType-enum">QSizePolicy.ControlType</a>&#160;<i>control1</i>, <a href="qsizepolicy.html#ControlType-enum">QSizePolicy.ControlType</a>&#160;<i>control2</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>option</i>&#160;=&#160;None, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>This method is also a Qt slot with the C++ signature <tt>int layoutSpacingImplementation(QSizePolicy::ControlType,QSizePolicy::ControlType,Qt::Orientation,const QStyleOption* = 0,const QWidget* = 0) const</tt>.</p><p>This slot is called by <a href="qstyle.html#layoutSpacing">layoutSpacing</a>() to determine the
spacing that should be used between <i>control1</i> and
<i>control2</i> in a layout. <i>orientation</i> specifies whether
the controls are laid out side by side or stacked vertically. The
<i>option</i> parameter can be used to pass extra information about
the parent widget. The <i>widget</i> parameter is optional and can
also be used if <i>option</i> is 0.</p>
<p>If you want to provide custom layout spacings in a <a href="qstyle.html">QStyle</a> subclass, implement a slot called
layoutSpacingImplementation() in your subclass. Be aware that this
slot will only be called if <a href="qstyle.html#PixelMetric-enum">PM_LayoutHorizontalSpacing</a> or
<a href="qstyle.html#PixelMetric-enum">PM_LayoutVerticalSpacing</a>
returns a negative value.</p>
<p>The default implementation returns -1.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qstyle.html#layoutSpacing">layoutSpacing</a>() and <a href="qstyle.html#combinedLayoutSpacing">combinedLayoutSpacing</a>().</p>


<h3 class="fn"><a name="pixelMetric" />int QStyle.pixelMetric (<i>self</i>, <a href="qstyle.html#PixelMetric-enum">PixelMetric</a>&#160;<i>metric</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>option</i>&#160;=&#160;None, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the value of the given pixel <i>metric</i>.</p>
<p>The specified <i>option</i> and <i>widget</i> can be used for
calculating the metric. In general, the <i>widget</i> argument is
not used. The <i>option</i> can be cast to the appropriate type
using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>()
function. Note that the <i>option</i> may be zero even for
PixelMetrics that can make use of it. See the table below for the
appropriate <i>option</i> casts:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Pixel Metric</th>
<th><a href="qstyleoption.html">QStyleOption</a> Subclass</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td><a href="qstyle.html#PixelMetric-enum">PM_SliderControlThickness</a></td>
<td><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#PixelMetric-enum">PM_SliderLength</a></td>
<td><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#PixelMetric-enum">PM_SliderTickmarkOffset</a></td>
<td><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#PixelMetric-enum">PM_SliderSpaceAvailable</a></td>
<td><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#PixelMetric-enum">PM_ScrollBarExtent</a></td>
<td><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#PixelMetric-enum">PM_TabBarTabOverlap</a></td>
<td><a href="qstyleoptiontab.html">QStyleOptionTab</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#PixelMetric-enum">PM_TabBarTabHSpace</a></td>
<td><a href="qstyleoptiontab.html">QStyleOptionTab</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#PixelMetric-enum">PM_TabBarTabVSpace</a></td>
<td><a href="qstyleoptiontab.html">QStyleOptionTab</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#PixelMetric-enum">PM_TabBarBaseHeight</a></td>
<td><a href="qstyleoptiontab.html">QStyleOptionTab</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#PixelMetric-enum">PM_TabBarBaseOverlap</a></td>
<td><a href="qstyleoptiontab.html">QStyleOptionTab</a></td>
</tr>
</table>
<p>Some pixel metrics are called from widgets and some are only
called internally by the style. If the metric is not called by a
widget, it is the discretion of the style author to make use of it.
For some styles, this may not be appropriate.</p>


<h3 class="fn"><a name="polish" />QStyle.polish (<i>self</i>, <a href="qwidget.html">QWidget</a>)</h3><p>Initializes the appearance of the given <i>widget</i>.</p>
<p>This function is called for every widget at some point after it
has been fully created but just <i>before</i> it is shown for the
very first time.</p>
<p>Note that the default implementation does nothing. Reasonable
actions in this function might be to call the <a class="compat" href="qwidget-qt3.html#setBackgroundMode">QWidget.setBackgroundMode</a>() function for the widget.
Do not use the function to set, for example, the geometry.
Reimplementing this function provides a back-door through which the
appearance of a widget can be changed, but with Qt's style engine
it is rarely necessary to implement this function; reimplement
<a href="qstyle.html#drawItemPixmap">drawItemPixmap</a>(), <a href="qstyle.html#drawItemText">drawItemText</a>(), <a href="qstyle.html#drawPrimitive">drawPrimitive</a>(), etc. instead.</p>
<p>The <a href="qobject.html#inherits">QWidget.inherits</a>()
function may provide enough information to allow class-specific
customizations. But because new <a href="qstyle.html">QStyle</a>
subclasses are expected to work reasonably with all current and
<i>future</i> widgets, limited use of hard-coded customization is
recommended.</p>
<p><b>See also</b> <a href="qstyle.html#unpolish">unpolish</a>().</p>


<h3 class="fn"><a name="polish-2" />QStyle.polish (<i>self</i>, <a href="qapplication.html">QApplication</a>)</h3><p>This is an overloaded function.</p>
<p>Late initialization of the given <i>application</i> object.</p>


<h3 class="fn"><a name="polish-3" /><a href="qpalette.html">QPalette</a> QStyle.polish (<i>self</i>, <a href="qpalette.html">QPalette</a>)</h3><p>This is an overloaded function.</p>
<p>Changes the <i>palette</i> according to style specific
requirements for color palettes (if any).</p>
<p><b>See also</b> <a href="qpalette.html">QPalette</a> and
<a href="qapplication.html#setPalette">QApplication.setPalette</a>().</p>


<h3 class="fn"><a name="proxy" /><a href="qstyle.html">QStyle</a> QStyle.proxy (<i>self</i>)</h3><p>This function returns the current proxy for this style. By
default most styles will return themselves. However when a proxy
style is in use, it will allow the style to call back into its
proxy.</p>
<p>This function was introduced in Qt 4.6.</p>


<h3 class="fn"><a name="sizeFromContents" /><a href="qsize.html">QSize</a> QStyle.sizeFromContents (<i>self</i>, <a href="qstyle.html#ContentsType-enum">ContentsType</a>&#160;<i>ct</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>opt</i>, <a href="qsize.html">QSize</a>&#160;<i>contentsSize</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the size of the element described by the specified
<i>option</i> and <i>type</i>, based on the provided
<i>contentsSize</i>.</p>
<p>The <i>option</i> argument is a pointer to a <a href="qstyleoption.html">QStyleOption</a> or one of its subclasses. The
<i>option</i> can be cast to the appropriate type using the
<a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>()
function. The <i>widget</i> is an optional argument and can contain
extra information used for calculating the size.</p>
<p>See the table below for the appropriate <i>option</i> casts:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Contents Type</th>
<th><a href="qstyleoption.html">QStyleOption</a> Subclass</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td><a href="qstyle.html#ContentsType-enum">CT_PushButton</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#ContentsType-enum">CT_CheckBox</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#ContentsType-enum">CT_RadioButton</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#ContentsType-enum">CT_ToolButton</a></td>
<td><a href="qstyleoptiontoolbutton.html">QStyleOptionToolButton</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#ContentsType-enum">CT_ComboBox</a></td>
<td><a href="qstyleoptioncombobox.html">QStyleOptionComboBox</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#ContentsType-enum">CT_Splitter</a></td>
<td><a href="qstyleoption.html">QStyleOption</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#ContentsType-enum">CT_Q3DockWindow</a></td>
<td><a href="qstyleoptionq3dockwindow.html">QStyleOptionQ3DockWindow</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#ContentsType-enum">CT_ProgressBar</a></td>
<td><a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#ContentsType-enum">CT_MenuItem</a></td>
<td><a href="qstyleoptionmenuitem.html">QStyleOptionMenuItem</a></td>
</tr>
</table>
<p><b>See also</b> <a href="qstyle.html#ContentsType-enum">ContentsType</a> and <a href="qstyleoption.html">QStyleOption</a>.</p>


<h3 class="fn"><a name="sliderPositionFromValue" />int QStyle.sliderPositionFromValue (int&#160;<i>min</i>, int&#160;<i>max</i>, int&#160;<i>logicalValue</i>, int&#160;<i>span</i>, bool&#160;<i>upsideDown</i>&#160;=&#160;False)</h3><p>Converts the given <i>logicalValue</i> to a pixel position. The
<i>min</i> parameter maps to 0, <i>max</i> maps to <i>span</i> and
other values are distributed evenly in-between.</p>
<p>This function can handle the entire integer range without
overflow, providing that <i>span</i> is less than 4096.</p>
<p>By default, this function assumes that the maximum value is on
the right for horizontal items and on the bottom for vertical
items. Set the <i>upsideDown</i> parameter to true to reverse this
behavior.</p>
<p><b>See also</b> <a href="qstyle.html#sliderValueFromPosition">sliderValueFromPosition</a>().</p>


<h3 class="fn"><a name="sliderValueFromPosition" />int QStyle.sliderValueFromPosition (int&#160;<i>min</i>, int&#160;<i>max</i>, int&#160;<i>position</i>, int&#160;<i>span</i>, bool&#160;<i>upsideDown</i>&#160;=&#160;False)</h3><p>Converts the given pixel <i>position</i> to a logical value. 0
maps to the <i>min</i> parameter, <i>span</i> maps to <i>max</i>
and other values are distributed evenly in-between.</p>
<p>This function can handle the entire integer range without
overflow.</p>
<p>By default, this function assumes that the maximum value is on
the right for horizontal items and on the bottom for vertical
items. Set the <i>upsideDown</i> parameter to true to reverse this
behavior.</p>
<p><b>See also</b> <a href="qstyle.html#sliderPositionFromValue">sliderPositionFromValue</a>().</p>


<h3 class="fn"><a name="standardIcon" /><a href="qicon.html">QIcon</a> QStyle.standardIcon (<i>self</i>, <a href="qstyle.html#StandardPixmap-enum">StandardPixmap</a>&#160;<i>standardIcon</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>option</i>&#160;=&#160;None, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>Returns an icon for the given <i>standardIcon</i>.</p>
<p>The <i>standardIcon</i> is a standard pixmap which can follow
some existing GUI style or guideline. The <i>option</i> argument
can be used to pass extra information required when defining the
appropriate icon. The <i>widget</i> argument is optional and can
also be used to aid the determination of the icon.</p>
<p><b>Warning:</b> Because of binary compatibility constraints,
this function is not virtual. If you want to provide your own icons
in a <a href="qstyle.html">QStyle</a> subclass, reimplement the
<a href="qstyle.html#standardIconImplementation">standardIconImplementation</a>()
slot in your subclass instead. The standardIcon() function will
dynamically detect the slot and call it.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qstyle.html#standardIconImplementation">standardIconImplementation</a>().</p>


<h3 class="fn"><a name="standardIconImplementation" /><a href="qicon.html">QIcon</a> QStyle.standardIconImplementation (<i>self</i>, <a href="qstyle.html#StandardPixmap-enum">StandardPixmap</a>&#160;<i>standardIcon</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>option</i>&#160;=&#160;None, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>This method is also a Qt slot with the C++ signature <tt>QIcon standardIconImplementation(QStyle::StandardPixmap,const QStyleOption* = 0,const QWidget* = 0) const</tt>.</p><p>Returns an icon for the given <i>standardIcon</i>.</p>
<p>Reimplement this slot to provide your own icons in a <a href="qstyle.html">QStyle</a> subclass; because of binary compatibility
constraints, the <a href="qstyle.html#standardIcon">standardIcon</a>() function (introduced
in Qt 4.1) is not virtual. Instead, <a href="qstyle.html#standardIcon">standardIcon</a>() will dynamically
detect and call <i>this</i> slot.</p>
<p>The <i>standardIcon</i> is a standard pixmap which can follow
some existing GUI style or guideline. The <i>option</i> argument
can be used to pass extra information required when defining the
appropriate icon. The <i>widget</i> argument is optional and can
also be used to aid the determination of the icon.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qstyle.html#standardIcon">standardIcon</a>().</p>


<h3 class="fn"><a name="standardPalette" /><a href="qpalette.html">QPalette</a> QStyle.standardPalette (<i>self</i>)</h3><p>Returns the style's standard palette.</p>
<p>Note that on systems that support system colors, the style's
standard palette is not used. In particular, the Windows XP, Vista,
and Mac styles do not use the standard palette, but make use of
native theme engines. With these styles, you should not set the
palette with QApplication.setStandardPalette().</p>


<h3 class="fn"><a name="standardPixmap" /><a href="qpixmap.html">QPixmap</a> QStyle.standardPixmap (<i>self</i>, <a href="qstyle.html#StandardPixmap-enum">StandardPixmap</a>&#160;<i>standardPixmap</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>option</i>&#160;=&#160;None, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><h3 class="fn"><a name="styleHint" />int QStyle.styleHint (<i>self</i>, <a href="qstyle.html#StyleHint-enum">StyleHint</a>&#160;<i>stylehint</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>option</i>&#160;=&#160;None, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None, <a href="qstylehintreturn.html">QStyleHintReturn</a>&#160;<i>returnData</i>&#160;=&#160;None)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns an integer representing the specified style <i>hint</i>
for the given <i>widget</i> described by the provided style
<i>option</i>.</p>
<p><i>returnData</i> is used when the querying widget needs more
detailed data than the integer that styleHint() returns. See the
<a href="qstylehintreturn.html">QStyleHintReturn</a> class
description for details.</p>


<h3 class="fn"><a name="subControlRect" /><a href="qrect.html">QRect</a> QStyle.subControlRect (<i>self</i>, <a href="qstyle.html#ComplexControl-enum">ComplexControl</a>&#160;<i>cc</i>, <a href="qstyleoptioncomplex.html">QStyleOptionComplex</a>&#160;<i>opt</i>, <a href="qstyle.html#SubControl-enum">SubControl</a>&#160;<i>sc</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the rectangle containing the specified <i>subControl</i>
of the given complex <i>control</i> (with the style specified by
<i>option</i>). The rectangle is defined in screen coordinates.</p>
<p>The <i>option</i> argument is a pointer to <a href="qstyleoptioncomplex.html">QStyleOptionComplex</a> or one of its
subclasses, and can be cast to the appropriate type using the
<a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>()
function. See <a href="qstyle.html#drawComplexControl">drawComplexControl</a>() for
details. The <i>widget</i> is optional and can contain additional
information for the function.</p>
<p><b>See also</b> <a href="qstyle.html#drawComplexControl">drawComplexControl</a>().</p>


<h3 class="fn"><a name="subElementRect" /><a href="qrect.html">QRect</a> QStyle.subElementRect (<i>self</i>, <a href="qstyle.html#SubElement-enum">SubElement</a>&#160;<i>subElement</i>, <a href="qstyleoption.html">QStyleOption</a>&#160;<i>option</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the sub-area for the given <i>element</i> as described
in the provided style <i>option</i>. The returned rectangle is
defined in screen coordinates.</p>
<p>The <i>widget</i> argument is optional and can be used to aid
determining the area. The <a href="qstyleoption.html">QStyleOption</a> object can be cast to the
appropriate type using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>()
function. See the table below for the appropriate <i>option</i>
casts:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Sub Element</th>
<th><a href="qstyleoption.html">QStyleOption</a> Subclass</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_PushButtonContents</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_PushButtonFocusRect</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_CheckBoxIndicator</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_CheckBoxContents</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_CheckBoxFocusRect</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_RadioButtonIndicator</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_RadioButtonContents</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_RadioButtonFocusRect</a></td>
<td><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_ComboBoxFocusRect</a></td>
<td><a href="qstyleoptioncombobox.html">QStyleOptionComboBox</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_Q3DockWindowHandleRect</a></td>
<td><a href="qstyleoptionq3dockwindow.html">QStyleOptionQ3DockWindow</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_ProgressBarGroove</a></td>
<td><a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a></td>
</tr>
<tr class="even" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_ProgressBarContents</a></td>
<td><a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a></td>
</tr>
<tr class="odd" valign="top">
<td><a href="qstyle.html#SubElement-enum">SE_ProgressBarLabel</a></td>
<td><a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a></td>
</tr>
</table>


<h3 class="fn"><a name="unpolish" />QStyle.unpolish (<i>self</i>, <a href="qwidget.html">QWidget</a>)</h3><p>Uninitialize the given <i>widget</i>'s appearance.</p>
<p>This function is the counterpart to <a href="qstyle.html#polish">polish</a>(). It is called for every polished
widget whenever the style is dynamically changed; the former style
has to unpolish its settings before the new style can polish them
again.</p>
<p>Note that unpolish() will only be called if the widget is
destroyed. This can cause problems in some cases, e.g, if you
remove a widget from the UI, cache it, and then reinsert it after
the style has changed; some of Qt's classes cache their
widgets.</p>
<p><b>See also</b> <a href="qstyle.html#polish">polish</a>().</p>


<h3 class="fn"><a name="unpolish-2" />QStyle.unpolish (<i>self</i>, <a href="qapplication.html">QApplication</a>)</h3><p>This is an overloaded function.</p>
<p>Uninitialize the given <i>application</i>.</p>


<h3 class="fn"><a name="visualAlignment" /><a href="qt-alignment.html">Qt.Alignment</a> QStyle.visualAlignment (<a href="qt.html#LayoutDirection-enum">Qt.LayoutDirection</a>&#160;<i>direction</i>, <a href="qt-alignment.html">Qt.Alignment</a>&#160;<i>alignment</i>)</h3><p>Transforms an <i>alignment</i> of <a href="qt.html#AlignmentFlag-enum">Qt.AlignLeft</a> or <a href="qt.html#AlignmentFlag-enum">Qt.AlignRight</a> without <a href="qt.html#AlignmentFlag-enum">Qt.AlignAbsolute</a> into <a href="qt.html#AlignmentFlag-enum">Qt.AlignLeft</a> or <a href="qt.html#AlignmentFlag-enum">Qt.AlignRight</a> with <a href="qt.html#AlignmentFlag-enum">Qt.AlignAbsolute</a> according to the
layout <i>direction</i>. The other alignment flags are left
untouched.</p>
<p>If no horizontal alignment was specified, the function returns
the default alignment for the given layout <i>direction</i>.</p>
<p><a href="qwidget.html#layoutDirection-prop">QWidget.layoutDirection</a></p>


<h3 class="fn"><a name="visualPos" /><a href="qpoint.html">QPoint</a> QStyle.visualPos (<a href="qt.html#LayoutDirection-enum">Qt.LayoutDirection</a>&#160;<i>direction</i>, <a href="qrect.html">QRect</a>&#160;<i>boundingRect</i>, <a href="qpoint.html">QPoint</a>&#160;<i>logicalPos</i>)</h3><p>Returns the given <i>logicalPosition</i> converted to screen
coordinates based on the specified <i>direction</i>. The
<i>boundingRectangle</i> is used when performing the
translation.</p>
<p><b>See also</b> <a href="qwidget.html#layoutDirection-prop">QWidget.layoutDirection</a>.</p>


<h3 class="fn"><a name="visualRect" /><a href="qrect.html">QRect</a> QStyle.visualRect (<a href="qt.html#LayoutDirection-enum">Qt.LayoutDirection</a>&#160;<i>direction</i>, <a href="qrect.html">QRect</a>&#160;<i>boundingRect</i>, <a href="qrect.html">QRect</a>&#160;<i>logicalRect</i>)</h3><p>Returns the given <i>logicalRectangle</i> converted to screen
coordinates based on the specified <i>direction</i>. The
<i>boundingRectangle</i> is used when performing the
translation.</p>
<p>This function is provided to support right-to-left desktops, and
is typically used in implementations of the <a href="qstyle.html#subControlRect">subControlRect</a>() function.</p>
<p><b>See also</b> <a href="qwidget.html#layoutDirection-prop">QWidget.layoutDirection</a>.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.11.2 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://qt.digia.com">Digia</a> 2014</td><td align="right" width="25%">Qt&#160;4.8.6</td></tr></table></div></address></body></html>