File: qtextformat.html

package info (click to toggle)
python-qt4 4.9.3-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 34,432 kB
  • sloc: python: 34,126; cpp: 11,938; xml: 290; makefile: 223; php: 27
file content (882 lines) | stat: -rw-r--r-- 50,273 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
<?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>QTextFormat 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">QTextFormat Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTextFormat class provides formatting information for a
<a href="qtextdocument.html">QTextDocument</a>. <a href="#details">More...</a></p>

<p>Inherited by <a href="qtextblockformat.html">QTextBlockFormat</a>, <a href="qtextcharformat.html">QTextCharFormat</a>, <a href="qtextframeformat.html">QTextFrameFormat</a> and <a href="qtextlistformat.html">QTextListFormat</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qtextformat.html#FormatType-enum">FormatType</a></b> { InvalidFormat, BlockFormat, CharFormat, ListFormat, ..., UserFormat }</li><li><div class="fn" />enum <b><a href="qtextformat.html#ObjectTypes-enum">ObjectTypes</a></b> { NoObject, ImageObject, TableObject, TableCellObject, UserObject }</li><li><div class="fn" />enum <b><a href="qtextformat.html#PageBreakFlag-enum">PageBreakFlag</a></b> { PageBreak_Auto, PageBreak_AlwaysBefore, PageBreak_AlwaysAfter }</li><li><div class="fn" />class <b><a href="qtextformat-pagebreakflags.html">PageBreakFlags</a></b></li><li><div class="fn" />enum <b><a href="qtextformat.html#Property-enum">Property</a></b> { ObjectIndex, CssFloat, LayoutDirection, OutlinePen, ..., UserProperty }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtextformat.html#QTextFormat">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#QTextFormat-2">__init__</a></b> (<i>self</i>, int&#160;<i>type</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#QTextFormat-3">__init__</a></b> (<i>self</i>, QTextFormat&#160;<i>rhs</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#QTextFormat-4">__init__</a></b> (<i>self</i>, QVariant&#160;<i>variant</i>)</li><li><div class="fn" />QBrush <b><a href="qtextformat.html#background">background</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextformat.html#boolProperty">boolProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" />QBrush <b><a href="qtextformat.html#brushProperty">brushProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#clearBackground">clearBackground</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#clearForeground">clearForeground</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#clearProperty">clearProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" />QColor <b><a href="qtextformat.html#colorProperty">colorProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" />float <b><a href="qtextformat.html#doubleProperty">doubleProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" />QBrush <b><a href="qtextformat.html#foreground">foreground</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextformat.html#hasProperty">hasProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" />int <b><a href="qtextformat.html#intProperty">intProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" />bool <b><a href="qtextformat.html#isBlockFormat">isBlockFormat</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextformat.html#isCharFormat">isCharFormat</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextformat.html#isFrameFormat">isFrameFormat</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextformat.html#isImageFormat">isImageFormat</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextformat.html#isListFormat">isListFormat</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextformat.html#isTableCellFormat">isTableCellFormat</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextformat.html#isTableFormat">isTableFormat</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtextformat.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.LayoutDirection <b><a href="qtextformat.html#layoutDirection">layoutDirection</a></b> (<i>self</i>)</li><li><div class="fn" />QTextLength <b><a href="qtextformat.html#lengthProperty">lengthProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" />list-of-QTextLength <b><a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#merge">merge</a></b> (<i>self</i>, QTextFormat&#160;<i>other</i>)</li><li><div class="fn" />int <b><a href="qtextformat.html#objectIndex">objectIndex</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtextformat.html#objectType">objectType</a></b> (<i>self</i>)</li><li><div class="fn" />QPen <b><a href="qtextformat.html#penProperty">penProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" />dict-of-int-QVariant <b><a href="qtextformat.html#properties">properties</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qtextformat.html#property">property</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" />int <b><a href="qtextformat.html#propertyCount">propertyCount</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#setBackground">setBackground</a></b> (<i>self</i>, QBrush&#160;<i>brush</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#setForeground">setForeground</a></b> (<i>self</i>, QBrush&#160;<i>brush</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#setLayoutDirection">setLayoutDirection</a></b> (<i>self</i>, Qt.LayoutDirection&#160;<i>direction</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#setObjectIndex">setObjectIndex</a></b> (<i>self</i>, int&#160;<i>object</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#setObjectType">setObjectType</a></b> (<i>self</i>, int&#160;<i>atype</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#setProperty">setProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>, QVariant&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qtextformat.html#setProperty-2">setProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>, list-of-QTextLength&#160;<i>lengths</i>)</li><li><div class="fn" />QString <b><a href="qtextformat.html#stringProperty">stringProperty</a></b> (<i>self</i>, int&#160;<i>propertyId</i>)</li><li><div class="fn" />QTextBlockFormat <b><a href="qtextformat.html#toBlockFormat">toBlockFormat</a></b> (<i>self</i>)</li><li><div class="fn" />QTextCharFormat <b><a href="qtextformat.html#toCharFormat">toCharFormat</a></b> (<i>self</i>)</li><li><div class="fn" />QTextFrameFormat <b><a href="qtextformat.html#toFrameFormat">toFrameFormat</a></b> (<i>self</i>)</li><li><div class="fn" />QTextImageFormat <b><a href="qtextformat.html#toImageFormat">toImageFormat</a></b> (<i>self</i>)</li><li><div class="fn" />QTextListFormat <b><a href="qtextformat.html#toListFormat">toListFormat</a></b> (<i>self</i>)</li><li><div class="fn" />QTextTableCellFormat <b><a href="qtextformat.html#toTableCellFormat">toTableCellFormat</a></b> (<i>self</i>)</li><li><div class="fn" />QTextTableFormat <b><a href="qtextformat.html#toTableFormat">toTableFormat</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtextformat.html#type">type</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qtextformat.html#__eq__">__eq__</a></b> (<i>self</i>, QTextFormat&#160;<i>rhs</i>)</li><li><div class="fn" />bool <b><a href="qtextformat.html#__ne__">__ne__</a></b> (<i>self</i>, QTextFormat&#160;<i>rhs</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTextFormat class provides formatting information for a
<a href="qtextdocument.html">QTextDocument</a>.</p>
<p>A QTextFormat is a generic class used for describing the format
of parts of a <a href="qtextdocument.html">QTextDocument</a>. The
derived classes <a href="qtextcharformat.html">QTextCharFormat</a>,
<a href="qtextblockformat.html">QTextBlockFormat</a>, <a href="qtextlistformat.html">QTextListFormat</a>, and <a href="qtexttableformat.html">QTextTableFormat</a> are usually more
useful, and describe the formatting that is applied to specific
parts of the document.</p>
<p>A format has a <tt>FormatType</tt> which specifies the kinds of
text item it can format; e.g. a block of text, a list, a table,
etc. A format also has various properties (some specific to
particular format types), as described by the Property enum. Every
property has a corresponding Property.</p>
<p>The format type is given by <a href="qtextformat.html#type">type</a>(), and the format can be tested
with <a href="qtextformat.html#isCharFormat">isCharFormat</a>(),
<a href="qtextformat.html#isBlockFormat">isBlockFormat</a>(),
<a href="qtextformat.html#isListFormat">isListFormat</a>(),
<a href="qtextformat.html#isTableFormat">isTableFormat</a>(),
<a href="qtextformat.html#isFrameFormat">isFrameFormat</a>(), and
<a href="qtextformat.html#isImageFormat">isImageFormat</a>(). If
the type is determined, it can be retrieved with <a href="qtextformat.html#toCharFormat">toCharFormat</a>(), <a href="qtextformat.html#toBlockFormat">toBlockFormat</a>(), <a href="qtextformat.html#toListFormat">toListFormat</a>(), <a href="qtextformat.html#toTableFormat">toTableFormat</a>(), <a href="qtextformat.html#toFrameFormat">toFrameFormat</a>(), and <a href="qtextformat.html#toImageFormat">toImageFormat</a>().</p>
<p>A format's properties can be set with the <a href="qtextformat.html#setProperty">setProperty</a>() functions, and
retrieved with <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), and
<a href="qtextformat.html#stringProperty">stringProperty</a>() as
appropriate. All the property IDs used in the format can be
retrieved with allPropertyIds(). One format can be merged into
another using <a href="qtextformat.html#merge">merge</a>().</p>
<p>A format's object index can be set with <a href="qtextformat.html#setObjectIndex">setObjectIndex</a>(), and
retrieved with <a href="qtextformat.html#objectIndex">objectIndex</a>(). These methods can
be used to associate the format with a <a href="qtextobject.html">QTextObject</a>. It is used to represent lists,
frames, and tables inside the document.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="FormatType-enum" />QTextFormat.FormatType</h3><p>This enum describes the text item a <a href="qtextformat.html">QTextFormat</a> object is formatting.</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>QTextFormat.InvalidFormat</tt></td>
<td class="topAlign"><tt>-1</tt></td>
<td class="topAlign">An invalid format as created by the default
constructor</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.BlockFormat</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The object formats a text block</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.CharFormat</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The object formats a single character</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.ListFormat</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">The object formats a list</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TableFormat</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">The object formats a table</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FrameFormat</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">The object formats a frame</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.UserFormat</tt></td>
<td class="topAlign"><tt>100</tt></td>
<td class="topAlign">&#160;</td>
</tr>
</table>
<p><b>See also</b> <a href="qtextcharformat.html">QTextCharFormat</a>, <a href="qtextblockformat.html">QTextBlockFormat</a>, <a href="qtextlistformat.html">QTextListFormat</a>, <a href="qtexttableformat.html">QTextTableFormat</a>, and <a href="qtextformat.html#type">type</a>().</p>


<h3 class="fn"><a name="ObjectTypes-enum" />QTextFormat.ObjectTypes</h3><p>This enum describes what kind of <a href="qtextobject.html">QTextObject</a> this format is associated
with.</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>QTextFormat.NoObject</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.ImageObject</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TableObject</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TableCellObject</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.UserObject</tt></td>
<td class="topAlign"><tt>0x1000</tt></td>
<td class="topAlign">The first object that can be used for
application-specific purposes.</td>
</tr>
</table>
<p><b>See also</b> <a href="qtextobject.html">QTextObject</a>,
<a href="qtexttable.html">QTextTable</a>, and <a href="qtextobject.html#format">QTextObject.format</a>().</p>


<h3 class="fn"><a name="PageBreakFlag-enum" />QTextFormat.PageBreakFlag</h3><p>This enum describes how page breaking is performed when
printing. It maps to the corresponding css properties.</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>QTextFormat.PageBreak_Auto</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The page break is determined automatically
depending on the available space on the current page</td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFormat.PageBreak_AlwaysBefore</tt></td>
<td class="topAlign"><tt>0x001</tt></td>
<td class="topAlign">The page is always broken before the
paragraph/table</td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFormat.PageBreak_AlwaysAfter</tt></td>
<td class="topAlign"><tt>0x010</tt></td>
<td class="topAlign">A new page is always started after the
paragraph/table</td>
</tr>
</table>
<p>This enum was introduced or modified in Qt 4.2.</p>
<p>The PageBreakFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;PageBreakFlag&gt;. It stores an OR
combination of PageBreakFlag values.</p>
<p><b>See also</b> <a href="qtextblockformat.html#pageBreakPolicy">QTextBlockFormat.pageBreakPolicy</a>(),
<a href="qtextframeformat.html#pageBreakPolicy">QTextFrameFormat.pageBreakPolicy</a>(),
and <a href="qtextformat.html#Property-enum">PageBreakPolicy</a>.</p>


<h3 class="fn"><a name="Property-enum" />QTextFormat.Property</h3><p>This enum describes the different properties a format can
have.</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>QTextFormat.ObjectIndex</tt></td>
<td class="topAlign"><tt>0x0</tt></td>
<td class="topAlign">The index of the formatted object. See
<a href="qtextformat.html#objectIndex">objectIndex</a>().</td>
</tr>
</table>
<p>Paragraph and character properties</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>QTextFormat.CssFloat</tt></td>
<td class="topAlign"><tt>0x0800</tt></td>
<td class="topAlign">How a frame is located relative to the
surrounding text</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.LayoutDirection</tt></td>
<td class="topAlign"><tt>0x0801</tt></td>
<td class="topAlign">The layout direction of the text in the
document (<a href="qt.html#LayoutDirection-enum">Qt.LayoutDirection</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.OutlinePen</tt></td>
<td class="topAlign"><tt>0x810</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.ForegroundBrush</tt></td>
<td class="topAlign"><tt>0x821</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.BackgroundBrush</tt></td>
<td class="topAlign"><tt>0x820</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.BackgroundImageUrl</tt></td>
<td class="topAlign"><tt>0x823</tt></td>
<td class="topAlign">&#160;</td>
</tr>
</table>
<p>Paragraph properties</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>QTextFormat.BlockAlignment</tt></td>
<td class="topAlign"><tt>0x1010</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.BlockTopMargin</tt></td>
<td class="topAlign"><tt>0x1030</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.BlockBottomMargin</tt></td>
<td class="topAlign"><tt>0x1031</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.BlockLeftMargin</tt></td>
<td class="topAlign"><tt>0x1032</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.BlockRightMargin</tt></td>
<td class="topAlign"><tt>0x1033</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TextIndent</tt></td>
<td class="topAlign"><tt>0x1034</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TabPositions</tt></td>
<td class="topAlign"><tt>0x1035</tt></td>
<td class="topAlign">Specifies the tab positions. The tab positions
are structs of <a href="qtextoption-tab.html">QTextOption.Tab</a>
which are stored in a <a href="qlist.html">QList</a> (internally,
in a <a href="qlist.html">QList</a>&lt;<a href="qvariant.html">QVariant</a>&gt;).</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.BlockIndent</tt></td>
<td class="topAlign"><tt>0x1040</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.LineHeight</tt></td>
<td class="topAlign"><tt>0x1048</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.LineHeightType</tt></td>
<td class="topAlign"><tt>0x1049</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFormat.BlockNonBreakableLines</tt></td>
<td class="topAlign"><tt>0x1050</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFormat.BlockTrailingHorizontalRulerWidth</tt></td>
<td class="topAlign"><tt>0x1060</tt></td>
<td class="topAlign">The width of a horizontal ruler element.</td>
</tr>
</table>
<p>Character properties</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>QTextFormat.FontFamily</tt></td>
<td class="topAlign"><tt>0x2000</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontPointSize</tt></td>
<td class="topAlign"><tt>0x2001</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontPixelSize</tt></td>
<td class="topAlign"><tt>0x2009</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontSizeAdjustment</tt></td>
<td class="topAlign"><tt>0x2002</tt></td>
<td class="topAlign">Specifies the change in size given to the
fontsize already set using FontPointSize or FontPixelSize.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontFixedPitch</tt></td>
<td class="topAlign"><tt>0x2008</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontWeight</tt></td>
<td class="topAlign"><tt>0x2003</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontItalic</tt></td>
<td class="topAlign"><tt>0x2004</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontUnderline</tt></td>
<td class="topAlign"><tt>0x2005</tt></td>
<td class="topAlign"><i>This property has been deprecated.</i> Use
QTextFormat.TextUnderlineStyle instead.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontOverline</tt></td>
<td class="topAlign"><tt>0x2006</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontStrikeOut</tt></td>
<td class="topAlign"><tt>0x2007</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontCapitalization</tt></td>
<td class="topAlign"><tt>FirstFontProperty</tt></td>
<td class="topAlign">Specifies the capitalization type that is to
be applied to the text.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontLetterSpacing</tt></td>
<td class="topAlign"><tt>0x1FE1</tt></td>
<td class="topAlign">Changes the default spacing between individual
letters in the font. The value is specified in percentage, with 100
as the default value.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontWordSpacing</tt></td>
<td class="topAlign"><tt>0x1FE2</tt></td>
<td class="topAlign">Changes the default spacing between individual
words. A positive value increases the word spacing by the
corresponding pixels; a negative value decreases the spacing.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontStyleHint</tt></td>
<td class="topAlign"><tt>0x1FE3</tt></td>
<td class="topAlign">Corresponds to the <a href="qfont.html#StyleHint-enum">QFont.StyleHint</a> property</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontStyleStrategy</tt></td>
<td class="topAlign"><tt>0x1FE4</tt></td>
<td class="topAlign">Corresponds to the <a href="qfont.html#StyleStrategy-enum">QFont.StyleStrategy</a>
property</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FontKerning</tt></td>
<td class="topAlign"><tt>0x1FE5</tt></td>
<td class="topAlign">Specifies whether the font has kerning turned
on.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFormat.FontHintingPreference</tt></td>
<td class="topAlign"><tt>0x1FE6</tt></td>
<td class="topAlign">Controls the use of hinting according to
values of the <a href="qfont.html#HintingPreference-enum">QFont.HintingPreference</a>
enum.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TextUnderlineColor</tt></td>
<td class="topAlign"><tt>0x2010</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFormat.TextVerticalAlignment</tt></td>
<td class="topAlign"><tt>0x2021</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TextOutline</tt></td>
<td class="topAlign"><tt>0x2022</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TextUnderlineStyle</tt></td>
<td class="topAlign"><tt>0x2023</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TextToolTip</tt></td>
<td class="topAlign"><tt>0x2024</tt></td>
<td class="topAlign">Specifies the (optional) tool tip to be
displayed for a fragment of text.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.IsAnchor</tt></td>
<td class="topAlign"><tt>0x2030</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.AnchorHref</tt></td>
<td class="topAlign"><tt>0x2031</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.AnchorName</tt></td>
<td class="topAlign"><tt>0x2032</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.ObjectType</tt></td>
<td class="topAlign"><tt>0x2f00</tt></td>
<td class="topAlign">&#160;</td>
</tr>
</table>
<p>List properties</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>QTextFormat.ListStyle</tt></td>
<td class="topAlign"><tt>0x3000</tt></td>
<td class="topAlign">Specifies the style used for the items in a
list, described by values of the <a href="qtextlistformat.html#Style-enum">QTextListFormat.Style</a>
enum.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.ListIndent</tt></td>
<td class="topAlign"><tt>0x3001</tt></td>
<td class="topAlign">Specifies the amount of indentation used for a
list.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.ListNumberPrefix</tt></td>
<td class="topAlign"><tt>0x3002</tt></td>
<td class="topAlign">Defines the text which is prepended to item
numbers in numeric lists.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.ListNumberSuffix</tt></td>
<td class="topAlign"><tt>0x3003</tt></td>
<td class="topAlign">Defines the text which is appended to item
numbers in numeric lists.</td>
</tr>
</table>
<p>Table and frame properties</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>QTextFormat.FrameBorder</tt></td>
<td class="topAlign"><tt>0x4000</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FrameBorderBrush</tt></td>
<td class="topAlign"><tt>0x4009</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FrameBorderStyle</tt></td>
<td class="topAlign"><tt>0x4010</tt></td>
<td class="topAlign">See the <a href="qtextframeformat.html#BorderStyle-enum">BorderStyle</a> enum.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FrameBottomMargin</tt></td>
<td class="topAlign"><tt>0x4006</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FrameHeight</tt></td>
<td class="topAlign"><tt>0x4004</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FrameLeftMargin</tt></td>
<td class="topAlign"><tt>0x4007</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FrameMargin</tt></td>
<td class="topAlign"><tt>0x4001</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FramePadding</tt></td>
<td class="topAlign"><tt>0x4002</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FrameRightMargin</tt></td>
<td class="topAlign"><tt>0x4008</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FrameTopMargin</tt></td>
<td class="topAlign"><tt>0x4005</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.FrameWidth</tt></td>
<td class="topAlign"><tt>0x4003</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TableCellSpacing</tt></td>
<td class="topAlign"><tt>0x4102</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TableCellPadding</tt></td>
<td class="topAlign"><tt>0x4103</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TableColumns</tt></td>
<td class="topAlign"><tt>0x4100</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFormat.TableColumnWidthConstraints</tt></td>
<td class="topAlign"><tt>0x4101</tt></td>
<td class="topAlign">&#160;</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TableHeaderRowCount</tt></td>
<td class="topAlign"><tt>0x4104</tt></td>
<td class="topAlign">&#160;</td>
</tr>
</table>
<p>Table cell properties</p>
<table class="valuelist">
<tr>
<th class="tblConst">Constant</th>
<th class="tblVal">Value</th>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TableCellRowSpan</tt></td>
<td class="topAlign"><tt>0x4810</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TableCellColumnSpan</tt></td>
<td class="topAlign"><tt>0x4811</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFormat.TableCellLeftPadding</tt></td>
<td class="topAlign"><tt>0x4814</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFormat.TableCellRightPadding</tt></td>
<td class="topAlign"><tt>0x4815</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.TableCellTopPadding</tt></td>
<td class="topAlign"><tt>0x4812</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QTextFormat.TableCellBottomPadding</tt></td>
<td class="topAlign"><tt>0x4813</tt></td>
</tr>
</table>
<p>Image properties</p>
<table class="valuelist">
<tr>
<th class="tblConst">Constant</th>
<th class="tblVal">Value</th>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.ImageName</tt></td>
<td class="topAlign"><tt>0x5000</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.ImageWidth</tt></td>
<td class="topAlign"><tt>0x5010</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.ImageHeight</tt></td>
<td class="topAlign"><tt>0x5011</tt></td>
</tr>
</table>
<p>Selection properties</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>QTextFormat.FullWidthSelection</tt></td>
<td class="topAlign"><tt>0x06000</tt></td>
<td class="topAlign">When set on the characterFormat of a
selection, the whole width of the text will be shown selected.</td>
</tr>
</table>
<p>Page break properties</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>QTextFormat.PageBreakPolicy</tt></td>
<td class="topAlign"><tt>0x7000</tt></td>
<td class="topAlign">Specifies how pages are broken. See the
<a href="qtextformat.html#PageBreakFlag-enum">PageBreakFlag</a>
enum.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTextFormat.UserProperty</tt></td>
<td class="topAlign"><tt>0x100000</tt></td>
<td class="topAlign">&#160;</td>
</tr>
</table>
<p><b>See also</b> <a href="qtextformat.html#property">property</a>() and <a href="qtextformat.html#setProperty">setProperty</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTextFormat" />QTextFormat.__init__ (<i>self</i>)</h3><p>Creates a new text format with an <tt>InvalidFormat</tt>.</p>
<p><b>See also</b> <a href="qtextformat.html#FormatType-enum">FormatType</a>.</p>


<h3 class="fn"><a name="QTextFormat-2" />QTextFormat.__init__ (<i>self</i>, int&#160;<i>type</i>)</h3><p>Creates a new text format of the given <i>type</i>.</p>
<p><b>See also</b> <a href="qtextformat.html#FormatType-enum">FormatType</a>.</p>


<h3 class="fn"><a name="QTextFormat-3" />QTextFormat.__init__ (<i>self</i>, <a href="qtextformat.html">QTextFormat</a>&#160;<i>rhs</i>)</h3><p>Creates a new text format with the same attributes as the
<i>other</i> text format.</p>


<h3 class="fn"><a name="QTextFormat-4" />QTextFormat.__init__ (<i>self</i>, QVariant&#160;<i>variant</i>)</h3><h3 class="fn"><a name="background" /><a href="qbrush.html">QBrush</a> QTextFormat.background (<i>self</i>)</h3><p>Returns the brush used to paint the document's background.</p>
<p><b>See also</b> <a href="qtextformat.html#setBackground">setBackground</a>(), <a href="qtextformat.html#clearBackground">clearBackground</a>(), and
<a href="qtextformat.html#foreground">foreground</a>().</p>


<h3 class="fn"><a name="boolProperty" />bool QTextFormat.boolProperty (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Returns the value of the property specified by
<i>propertyId</i>. If the property isn't of QTextFormat.Bool type,
false is returned instead.</p>
<p><b>See also</b> <a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(),
and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="brushProperty" /><a href="qbrush.html">QBrush</a> QTextFormat.brushProperty (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Returns the value of the property given by <i>propertyId</i>; if
the property isn't of <a href="qvariant.html#Type-enum">QVariant.Brush</a> type, <a href="qt.html#BrushStyle-enum">Qt.NoBrush</a> is returned instead.</p>
<p><b>See also</b> <a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(),
and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="clearBackground" />QTextFormat.clearBackground (<i>self</i>)</h3><p>Clears the brush used to paint the document's background. The
default brush will be used.</p>
<p><b>See also</b> <a href="qtextformat.html#background">background</a>(), <a href="qtextformat.html#setBackground">setBackground</a>(), and <a href="qtextformat.html#clearForeground">clearForeground</a>().</p>


<h3 class="fn"><a name="clearForeground" />QTextFormat.clearForeground (<i>self</i>)</h3><p>Clears the brush used to paint the document's foreground. The
default brush will be used.</p>
<p><b>See also</b> <a href="qtextformat.html#foreground">foreground</a>(), <a href="qtextformat.html#setForeground">setForeground</a>(), and <a href="qtextformat.html#clearBackground">clearBackground</a>().</p>


<h3 class="fn"><a name="clearProperty" />QTextFormat.clearProperty (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Clears the value of the property given by <i>propertyId</i></p>
<p><b>See also</b> <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="colorProperty" /><a href="qcolor.html">QColor</a> QTextFormat.colorProperty (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Returns the value of the property given by <i>propertyId</i>; if
the property isn't of <a href="qvariant.html#Type-enum">QVariant.Color</a> type, an invalid
color is returned instead.</p>
<p><b>See also</b> <a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(),
and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="doubleProperty" />float QTextFormat.doubleProperty (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Returns the value of the property specified by
<i>propertyId</i>. If the property isn't of <a href="qvariant.html#Type-enum">QVariant.Double</a> or <a href="qmetatype.html#Type-enum">QMetaType.Float</a> type, 0 is returned
instead.</p>
<p><b>See also</b> <a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(),
and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="foreground" /><a href="qbrush.html">QBrush</a> QTextFormat.foreground (<i>self</i>)</h3><p>Returns the brush used to render foreground details, such as
text, frame outlines, and table borders.</p>
<p><b>See also</b> <a href="qtextformat.html#setForeground">setForeground</a>(), <a href="qtextformat.html#clearForeground">clearForeground</a>(), and
<a href="qtextformat.html#background">background</a>().</p>


<h3 class="fn"><a name="hasProperty" />bool QTextFormat.hasProperty (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Returns true if the text format has a property with the given
<i>propertyId</i>; otherwise returns false.</p>
<p><b>See also</b> <a href="qtextformat.html#properties">properties</a>() and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="intProperty" />int QTextFormat.intProperty (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Returns the value of the property specified by
<i>propertyId</i>. If the property is not of QTextFormat.Integer
type, 0 is returned instead.</p>
<p><b>See also</b> <a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(),
and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="isBlockFormat" />bool QTextFormat.isBlockFormat (<i>self</i>)</h3><p>Returns true if this text format is a <tt>BlockFormat</tt>;
otherwise returns false.</p>


<h3 class="fn"><a name="isCharFormat" />bool QTextFormat.isCharFormat (<i>self</i>)</h3><p>Returns true if this text format is a <tt>CharFormat</tt>;
otherwise returns false.</p>


<h3 class="fn"><a name="isFrameFormat" />bool QTextFormat.isFrameFormat (<i>self</i>)</h3><p>Returns true if this text format is a <tt>FrameFormat</tt>;
otherwise returns false.</p>


<h3 class="fn"><a name="isImageFormat" />bool QTextFormat.isImageFormat (<i>self</i>)</h3><p>Returns true if this text format is an image format; otherwise
returns false.</p>


<h3 class="fn"><a name="isListFormat" />bool QTextFormat.isListFormat (<i>self</i>)</h3><p>Returns true if this text format is a <tt>ListFormat</tt>;
otherwise returns false.</p>


<h3 class="fn"><a name="isTableCellFormat" />bool QTextFormat.isTableCellFormat (<i>self</i>)</h3><p>Returns true if this text format is a <tt>TableCellFormat</tt>;
otherwise returns false.</p>
<p>This function was introduced in Qt 4.4.</p>


<h3 class="fn"><a name="isTableFormat" />bool QTextFormat.isTableFormat (<i>self</i>)</h3><p>Returns true if this text format is a <tt>TableFormat</tt>;
otherwise returns false.</p>


<h3 class="fn"><a name="isValid" />bool QTextFormat.isValid (<i>self</i>)</h3><p>Returns true if the format is valid (i.e. is not <a href="qtextformat.html#FormatType-enum">InvalidFormat</a>); otherwise
returns false.</p>


<h3 class="fn"><a name="layoutDirection" /><a href="qt.html#LayoutDirection-enum">Qt.LayoutDirection</a> QTextFormat.layoutDirection (<i>self</i>)</h3><p>Returns the document's layout direction.</p>
<p><b>See also</b> <a href="qtextformat.html#setLayoutDirection">setLayoutDirection</a>().</p>


<h3 class="fn"><a name="lengthProperty" /><a href="qtextlength.html">QTextLength</a> QTextFormat.lengthProperty (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Returns the value of the property given by
<i>propertyId</i>.</p>
<p><b>See also</b> <a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(),
and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="lengthVectorProperty" />list-of-QTextLength QTextFormat.lengthVectorProperty (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Returns the value of the property given by <i>propertyId</i>. If
the property isn't of QTextFormat.LengthVector type, an empty
length vector is returned instead.</p>
<p><b>See also</b> <a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), and
<a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="merge" />QTextFormat.merge (<i>self</i>, <a href="qtextformat.html">QTextFormat</a>&#160;<i>other</i>)</h3><p>Merges the <i>other</i> format with this format; where there are
conflicts the <i>other</i> format takes precedence.</p>


<h3 class="fn"><a name="objectIndex" />int QTextFormat.objectIndex (<i>self</i>)</h3><p>Returns the index of the format object, or -1 if the format
object is invalid.</p>
<p><b>See also</b> <a href="qtextformat.html#setObjectIndex">setObjectIndex</a>().</p>


<h3 class="fn"><a name="objectType" />int QTextFormat.objectType (<i>self</i>)</h3><p>Returns the text format's object type.</p>
<p><b>See also</b> <a href="qtextformat.html#ObjectTypes-enum">ObjectTypes</a> and <a href="qtextformat.html#setObjectType">setObjectType</a>().</p>


<h3 class="fn"><a name="penProperty" /><a href="qpen.html">QPen</a> QTextFormat.penProperty (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Returns the value of the property given by <i>propertyId</i>; if
the property isn't of <a href="qvariant.html#Type-enum">QVariant.Pen</a> type, <a href="qt.html#PenStyle-enum">Qt.NoPen</a> is returned instead.</p>
<p><b>See also</b> <a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#stringProperty">stringProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(),
and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="properties" />dict-of-int-QVariant QTextFormat.properties (<i>self</i>)</h3><p>Returns a map with all properties of this text format.</p>


<h3 class="fn"><a name="property" />QVariant QTextFormat.property (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Returns the property specified by the given
<i>propertyId</i>.</p>
<p><b>See also</b> <a href="qtextformat.html#setProperty">setProperty</a>() and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="propertyCount" />int QTextFormat.propertyCount (<i>self</i>)</h3><p>Returns the number of properties stored in the format.</p>
<p>This function was introduced in Qt 4.3.</p>


<h3 class="fn"><a name="setBackground" />QTextFormat.setBackground (<i>self</i>, <a href="qbrush.html">QBrush</a>&#160;<i>brush</i>)</h3><p>Sets the brush use to paint the document's background to the
<i>brush</i> specified.</p>
<p><b>See also</b> <a href="qtextformat.html#background">background</a>(), <a href="qtextformat.html#clearBackground">clearBackground</a>(), and
<a href="qtextformat.html#setForeground">setForeground</a>().</p>


<h3 class="fn"><a name="setForeground" />QTextFormat.setForeground (<i>self</i>, <a href="qbrush.html">QBrush</a>&#160;<i>brush</i>)</h3><p>Sets the foreground brush to the specified <i>brush</i>. The
foreground brush is mostly used to render text.</p>
<p><b>See also</b> <a href="qtextformat.html#foreground">foreground</a>(), <a href="qtextformat.html#clearForeground">clearForeground</a>(), and
<a href="qtextformat.html#setBackground">setBackground</a>().</p>


<h3 class="fn"><a name="setLayoutDirection" />QTextFormat.setLayoutDirection (<i>self</i>, <a href="qt.html#LayoutDirection-enum">Qt.LayoutDirection</a>&#160;<i>direction</i>)</h3><p>Sets the document's layout direction to the specified
<i>direction</i>.</p>
<p><b>See also</b> <a href="qtextformat.html#layoutDirection">layoutDirection</a>().</p>


<h3 class="fn"><a name="setObjectIndex" />QTextFormat.setObjectIndex (<i>self</i>, int&#160;<i>object</i>)</h3><p>Sets the format object's object <i>index</i>.</p>
<p><b>See also</b> <a href="qtextformat.html#objectIndex">objectIndex</a>().</p>


<h3 class="fn"><a name="setObjectType" />QTextFormat.setObjectType (<i>self</i>, int&#160;<i>atype</i>)</h3><p>Sets the text format's object type to <i>type</i>.</p>
<p><b>See also</b> <a href="qtextformat.html#ObjectTypes-enum">ObjectTypes</a> and <a href="qtextformat.html#objectType">objectType</a>().</p>


<h3 class="fn"><a name="setProperty" />QTextFormat.setProperty (<i>self</i>, int&#160;<i>propertyId</i>, QVariant&#160;<i>value</i>)</h3><p>Sets the property specified by the <i>propertyId</i> to the
given <i>value</i>.</p>
<p><b>See also</b> <a href="qtextformat.html#property">property</a>() and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="setProperty-2" />QTextFormat.setProperty (<i>self</i>, int&#160;<i>propertyId</i>, list-of-QTextLength&#160;<i>lengths</i>)</h3><p>Sets the value of the property given by <i>propertyId</i> to
<i>value</i>.</p>
<p><b>See also</b> <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>()
and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="stringProperty" />QString QTextFormat.stringProperty (<i>self</i>, int&#160;<i>propertyId</i>)</h3><p>Returns the value of the property given by <i>propertyId</i>; if
the property isn't of <a href="qvariant.html#Type-enum">QVariant.String</a> type, an empty
string is returned instead.</p>
<p><b>See also</b> <a href="qtextformat.html#setProperty">setProperty</a>(), <a href="qtextformat.html#boolProperty">boolProperty</a>(), <a href="qtextformat.html#intProperty">intProperty</a>(), <a href="qtextformat.html#doubleProperty">doubleProperty</a>(), <a href="qtextformat.html#colorProperty">colorProperty</a>(), <a href="qtextformat.html#lengthProperty">lengthProperty</a>(), <a href="qtextformat.html#lengthVectorProperty">lengthVectorProperty</a>(),
and <a href="qtextformat.html#Property-enum">Property</a>.</p>


<h3 class="fn"><a name="toBlockFormat" /><a href="qtextblockformat.html">QTextBlockFormat</a> QTextFormat.toBlockFormat (<i>self</i>)</h3><p>Returns this format as a block format.</p>


<h3 class="fn"><a name="toCharFormat" /><a href="qtextcharformat.html">QTextCharFormat</a> QTextFormat.toCharFormat (<i>self</i>)</h3><p>Returns this format as a character format.</p>


<h3 class="fn"><a name="toFrameFormat" /><a href="qtextframeformat.html">QTextFrameFormat</a> QTextFormat.toFrameFormat (<i>self</i>)</h3><p>Returns this format as a frame format.</p>


<h3 class="fn"><a name="toImageFormat" /><a href="qtextimageformat.html">QTextImageFormat</a> QTextFormat.toImageFormat (<i>self</i>)</h3><p>Returns this format as an image format.</p>


<h3 class="fn"><a name="toListFormat" /><a href="qtextlistformat.html">QTextListFormat</a> QTextFormat.toListFormat (<i>self</i>)</h3><p>Returns this format as a list format.</p>


<h3 class="fn"><a name="toTableCellFormat" /><a href="qtexttablecellformat.html">QTextTableCellFormat</a> QTextFormat.toTableCellFormat (<i>self</i>)</h3><p>Returns this format as a table cell format.</p>
<p>This function was introduced in Qt 4.4.</p>


<h3 class="fn"><a name="toTableFormat" /><a href="qtexttableformat.html">QTextTableFormat</a> QTextFormat.toTableFormat (<i>self</i>)</h3><p>Returns this format as a table format.</p>


<h3 class="fn"><a name="type" />int QTextFormat.type (<i>self</i>)</h3><p>Returns the type of this format.</p>
<p><b>See also</b> <a href="qtextformat.html#FormatType-enum">FormatType</a>.</p>


<h3 class="fn"><a name="__eq__" />bool QTextFormat.__eq__ (<i>self</i>, <a href="qtextformat.html">QTextFormat</a>&#160;<i>rhs</i>)</h3><h3 class="fn"><a name="__ne__" />bool QTextFormat.__ne__ (<i>self</i>, <a href="qtextformat.html">QTextFormat</a>&#160;<i>rhs</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.3 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://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.2</td></tr></table></div></address></body></html>