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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/doc/porting3.doc:36 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Porting to TQt 3.x</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
<a href="index.html">
<font color="#004faf">Home</font></a>
| <a href="classes.html">
<font color="#004faf">All Classes</font></a>
| <a href="mainclasses.html">
<font color="#004faf">Main Classes</font></a>
| <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
| <a href="groups.html">
<font color="#004faf">Grouped Classes</font></a>
| <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>Porting to TQt 3.x</h1>
<p> This document describes porting applications from TQt 2.x to TQt 3.x.
<p> The TQt 3.x series is not binary compatible with the 2.x series. This
means programs compiled for TQt 2.x must be recompiled to work with TQt
3.x. TQt 3.x is also not completely <em>source</em> compatible with 2.x,
however all points of incompatibility cause compiler errors or
run-time messages (rather than mysterious results). TQt 3.x includes
many additional features and discards obsolete functionality. Porting
from TQt 2.x to TQt 3.x is straightforward, and once completed makes
the considerable additional power and flexibility of TQt 3.x available
for use in your applications.
<p> To port code from TQt 2.x to TQt 3.x:
<p> <ol type=1>
<p> <li> Briefly read the porting notes below to get an idea of what to expect.
<li> Be sure your code compiles and runs well on all your target platforms
with TQt 2.x.
<li> Recompile with TQt 3.x. For each error, search below for related
identifiers (e.g. function names, class names). This document
mentions all relevant identifiers to help you get the information
you need at the cost of being a little verbose.
<li> If you get stuck, ask on the <a href="http://qt-interest.trolltech.com/">qt-interest</a> mailing list, or Trolltech Technical Support if
you're a registered licensee.
<p> </ol>
<p> Table of contents:
<p> <!-- toc -->
<ul>
<li><a href="#1"> Link Errors on Windows
</a>
<li><a href="#2"> Header file inclusion changes
</a>
<li><a href="#3"> Namespace
</a>
<li><a href="#4-1"> Removed Properties
</a>
<li><a href="#4-2"> Removed Functions
</a>
<li><a href="#5"> Obsoleted Functions
</a>
<li><a href="#6"> Collection Class Renaming
</a>
<li><a href="#7"> TQButtonGroup
</a>
<li><a href="#8"> TQDate
</a>
<li><a href="#9"> TQFileDialog
</a>
<li><a href="#10"> TQFont
</a>
<li><a href="#11"> TQInputDialog
</a>
<li><a href="#12"> TQLayout and Other Abstract Layout Classes
</a>
<li><a href="#13"> TQListViewItem
</a>
<li><a href="#14"> TQMoveEvent
</a>
<li><a href="#15"> TQMultiLineEdit
</a>
<li><a href="#16"> TQPrinter
</a>
<li><a href="#17"> TQRegExp
</a>
<ul>
<li><a href="#17-1"> New special characters
</a>
<li><a href="#17-2"> TQRegExp::operator=()
</a>
<li><a href="#17-3"> TQRegExp::match()
</a>
<li><a href="#17-4"> TQRegExp::find()
</a>
<li><a href="#17-5"> TQString::findRev() and TQString::contains()
</a>
<li><a href="#17-6"> TQString::replace()
</a>
</ul>
<li><a href="#18"> TQSemiModal
</a>
<li><a href="#19"> TQSortedList
</a>
<li><a href="#20"> TQTableView
</a>
<li><a href="#21"> TQToolButton
</a>
<li><a href="#22"> TQTextStream
</a>
<li><a href="#23"> TQTranslator
</a>
<li><a href="#24"> TQWidget
</a>
<li><a href="#25"> TQXml Classes
</a>
<ul>
<li><a href="#25-1"> TQXmlInputSource
</a>
<li><a href="#25-2"> TQXmlLocator
</a>
</ul>
<li><a href="#26"> Asynchronous I/O Classes
</a>
<li><a href="#27"> Transparent widgets
</a>
<li><a href="#28"> Bezier Curves
</a>
<li><a href="#29"> Locale-aware String Comparisons in TQIconView, TQListBox,
TQListView and TQTable
</a>
</ul>
<!-- endtoc -->
<p> <a name="Linkerrors"></a>
<h2> Link Errors on Windows
</h2>
<a name="1"></a><p> On Windows, originally in TQt 2.x, the default configuration of the TQt
library is static. If you just use the default configuration you
don't need to set certain preprocessor defines. In TQt 3.0, the
default configuration of the TQt library is to build it as a shared
library, therefore the preprocessor define <tt>QT_DLL</tt> is needed.
<p> If you use tmake with TQt 2.x, and now use qmake with TQt 3.x, then the
cause of the problem is with the project file. In the project file,
there is usually line that looks like:
<p> <tt>CONFIG</tt> = ...
<p> this should be changed to
<p> <tt>CONFIG</tt> += ...
<p> so that qmake can look at the configuration that TQt was built with and
set any relevant preprocessor defines in the makefile.
<p> <a name="Headers"></a>
<h2> Header file inclusion changes
</h2>
<a name="2"></a><p> TQt 3.x remove some unnecessary nested #include directives from
header files. This speeds up compilation when you don't need those
nested header files. But in some cases you will find you need to add
an extra #include to your files.
<p> For example, if you get a message about <a href="tqstringlist.html">TQStringList</a> or its functions
not being defined, then add <tt>#include <tqstringlist.h></tt> at
the top of the file giving the error.
<p> Header files that you might need to add #include directives for include:
<ul>
<li> <tt><tqcursor.h></tt>
<li> <tt><tqpainter.h></tt>
<li> <tt><tqpen.h></tt>
<li> <tt><tqstringlist.h></tt>
<li> <tt><tqregexp.h></tt>
<li> <tt><tqstrlist.h></tt>
<li> <tt><tqstyle.h></tt>
<li> <tt><tqvaluelist.h></tt>
</ul>
<p> <h2> Namespace
</h2>
<a name="3"></a><p> TQt 3.x is namespace clean. A few global identifiers that had been
left in TQt 2.x have been discarded.
<p> Enumeration <a href="tqt.html#CursorShape-enum">TQt::CursorShape</a> and its values are now part of the
special <a href="tqt.html">TQt</a> class defined in tqnamespace.h. If you get compilation
errors about these being missing (unlikely, since most of your code will
be in classes that inherit from the TQt namespace class), then apply
the following changes:
<p> <ul>
<li> <tt>TQCursorShape</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::CursorShape</a>
<li> <tt>ArrowCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::ArrowCursor</a>
<li> <tt>UpArrowCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::UpArrowCursor</a>
<li> <tt>CrossCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::CrossCursor</a>
<li> <tt>WaitCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::WaitCursor</a>
<li> <tt>IbeamCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::IbeamCursor</a>
<li> <tt>SizeVerCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::SizeVerCursor</a>
<li> <tt>SizeHorCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::SizeHorCursor</a>
<li> <tt>SizeBDiagCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::SizeBDiagCursor</a>
<li> <tt>SizeFDiagCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::SizeFDiagCursor</a>
<li> <tt>SizeAllCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::SizeAllCursor</a>
<li> <tt>BlankCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::BlankCursor</a>
<li> <tt>SplitVCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::SplitVCursor</a>
<li> <tt>SplitHCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::SplitHCursor</a>
<li> <tt>PointingHandCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::PointingHandCursor</a>
<li> <tt>BitmapCursor</tt> becomes <a href="tqt.html#CursorShape-enum">TQt::BitmapCursor</a>
</ul>
<p> The names of some debugging macro variables have been changed. We have
tried not to break source compatibility as much as possible. If you observe
error messages on the UNIX console or the Windows debugging stream that were
previously disabled, please check these macro variables:
<p> <ul>
<li> <tt>DEBUG</tt> becomes <tt>QT_DEBUG</tt>
<li> <tt>NO_DEBUG</tt> becomes <tt>TQT_NO_DEBUG</tt>
<li> <tt>NO_CHECK</tt> becomes <tt>TQT_NO_CHECK</tt>
<li> <tt>CHECK_STATE</tt> becomes <tt>QT_CHECK_STATE</tt>
<li> <tt>CHECK_RANGE</tt> becomes <tt>QT_CHECK_RANGE</tt>
<li> <tt>CHECK_NULL</tt> becomes <tt>QT_CHECK_NULL</tt>
<li> <tt>CHECK_MATH</tt> becomes <tt>QT_CHECK_MATH</tt>
</ul>
<p> The name of some debugging macro functions has been changed:
<p> <ul>
<li> <tt>ASSERT</tt> becomes <tt>Q_ASSERT</tt>
</ul>
<p> For the record, undocumented macro variables that are not part of the API
have been changed:
<p> <ul>
<li> <tt>_OS_*_</tt> becomes <tt>Q_OS_*</tt>
<li> <tt>_WS_*_</tt> becomes <tt>TQ_WS_*</tt>
<li> <tt>_CC_*_</tt> becomes <tt>Q_CC_*</tt>
</ul>
<p> <h2> Removed Properties
</h2>
<a name="4-1"></a><p> All these properties have been removed in TQt 3.x:
<ul>
<li> TQButton::autoResize
<li> TQLineEdit::hasMarkedText. Use TQLineEdit::hasSelectedText instead.
<li> TQLineEdit::markedText. Use TQLineEdit::selectedText instead.
<li> TQToolButton::offIconSet. Use TQToolButton::iconSet instead.
<li> TQToolButton::onIconSet. Use TQToolButton::iconSet instead.
</ul>
<p> <h2> Removed Functions
</h2>
<a name="4-2"></a><p> All these functions have been removed in TQt 3.x:
<ul>
<li> TQButton::autoResize() const
<li> TQButton::setAutoResize(bool)
<li> TQFont::charSet()
<li> TQFont::setCharSet()
<li> TQLineEdit::cursorLeft(bool mark, int steps = 1). Use TQLineEdit::cursorBackward() instead.
<li> TQLineEdit::cursorRight(bool mark, int steps = 1). Use TQLineEdit::cursorForward() instead.
<li> TQLineEdit::hasMarkedText() const. Use TQLineEdit::hasSelectedText() instead.
<li> TQLineEdit::markedText() const. Use TQLineEdit::selectedText() instead.
<li> TQLineEdit::repaintArea(int, int). Use TQLineEdit::update() instead.
<li> TQMenuBar::setActItem()
<li> TQMenuBar::setWindowsAltMode()
<li> TQObject::initMetaObject()
<li> TQPainter::drawQuadBezier()
<li> TQPalette::normal(). Use TQPalette::active() instead.
<li> TQPalette::setNormal(). Use TQPalette::setActive() instead.
<li> TQPointArray::quadBezier()
<li> TQRegExp::find()
<li> TQSignal::block(bool b)
<li> TQSignal::isBlocked() const
<li> TQSignal::parameter() const. Use TQSignal::value() instead.
<li> TQSignal::setParameter(int value). Use TQSignal::setValue() instead.
<li> TQSpinBox::downButton()
<li> TQSpinBox::upButton()
<li> TQString::basicDirection()
<li> TQString::visual()
<li> TQStyle::set...() functions
<li> TQStyle::drawArrow()
<li> TQThread::postEvent(TQObject *receiver, TQEvent *event). Use TQApplication::postEvent() instead.
<li> TQToolButton::iconSet(bool on) const
<li> TQToolButton::offIconSet() const
<li> TQToolButton::onIconSet() const
<li> TQToolButton::setIconSet(const & set, bool on)
<li> TQToolButton::setOffIconSet(const TQIconSet &)
<li> TQToolButton::setOnIconSet(const TQIconSet &)
<li> TQWidget::setFontPropagation()
<li> TQWidget::setPalettePropagation()
</ul>
<p> Also, to avoid conflicts with <tt><iostream></tt>, the following three
global functions have been renamed:
<ul>
<li> setw() (renamed qSetW())
<li> setfill() (renamed qSetFill())
<li> setprecision() (renamed qSetPrecision())
</ul>
<p> <h2> Obsoleted Functions
</h2>
<a name="5"></a><p> The following functions have been obsoleted in TQt 3.0. The
documentation of each of these functions should explain how to
replace them in TQt 3.0.
<p> <b>Warning:</b> It is best to consult <a href="http://doc.trolltech.com/3.0/">http://doc.trolltech.com/3.0/</a>
rather than the documentation supplied with TQt to obtain the latest
information regarding obsolete functions and how to replace them in
new code.
<p> <ul>
<li> <a href="tqaccel.html#keyToString">TQAccel::keyToString</a>( <a href="tqkeysequence.html">TQKeySequence</a> k )
<li> <a href="tqaccel.html#stringToKey">TQAccel::stringToKey</a>( const <a href="tqstring.html">TQString</a> & s )
<li> <a href="tqactiongroup.html#insert">TQActionGroup::insert</a>( <a href="tqaction.html">TQAction</a> *a )
<li> <a href="tqcanvasitem.html#active">TQCanvasItem::active</a>() const
<li> <a href="tqcanvasitem.html#enabled">TQCanvasItem::enabled</a>() const
<li> <a href="tqcanvasitem.html#selected">TQCanvasItem::selected</a>() const
<li> <a href="tqcanvasitem.html#visible">TQCanvasItem::visible</a>() const
<li> <a href="tqcanvaspixmaparray.html#TQCanvasPixmapArray">TQCanvasPixmapArray::TQCanvasPixmapArray</a>( <a href="tqptrlist.html">TQPtrList</a><TQPixmap> list, TQPtrList<TQPoint> hotspots )
<li> <a href="tqcanvaspixmaparray.html#operator!">TQCanvasPixmapArray::operator!</a>()
<li> <a href="tqcolorgroup.html#TQColorGroup">TQColorGroup::TQColorGroup</a>( const <a href="tqcolor.html">TQColor</a> & foreground, const TQColor & background, const TQColor & light, const TQColor & dark, const TQColor & mid, const TQColor & text, const TQColor & base )
<li> <a href="tqcombobox.html#autoResize">TQComboBox::autoResize</a>() const
<li> <a href="tqcombobox.html#setAutoResize">TQComboBox::setAutoResize</a>( bool )
<li> <a href="tqdate.html#dayName">TQDate::dayName</a>( int weekday )
<li> <a href="tqdate.html#monthName">TQDate::monthName</a>( int month )
<li> <a href="tqdir.html#encodedEntryList">TQDir::encodedEntryList</a>( const <a href="tqstring.html">TQString</a> & nameFilter, int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const
<li> TQDir::encodedEntryList( int filterSpec = DefaultFilter, int sortSpec = DefaultSort ) const
<li> <a href="tqdockwindow.html#isHorizontalStretchable">TQDockWindow::isHorizontalStretchable</a>() const
<li> <a href="tqdockwindow.html#isVerticalStretchable">TQDockWindow::isVerticalStretchable</a>() const
<li> <a href="tqdockwindow.html#setHorizontalStretchable">TQDockWindow::setHorizontalStretchable</a>( bool b )
<li> <a href="tqdockwindow.html#setVerticalStretchable">TQDockWindow::setVerticalStretchable</a>( bool b )
<li> <a href="tqfont.html#defaultFont">TQFont::defaultFont</a>()
<li> <a href="tqfont.html#setDefaultFont">TQFont::setDefaultFont</a>( const <a href="tqfont.html">TQFont</a> & f )
<li> <a href="tqfont.html#setPixelSizeFloat">TQFont::setPixelSizeFloat</a>( float pixelSize )
<li> <a href="tqfontdatabase.html#bold">TQFontDatabase::bold</a>( const TQString & family, const TQString & style, const <a href="tqstring.html">TQString</a> & ) const
<li> <a href="tqfontdatabase.html#families">TQFontDatabase::families</a>( bool ) const
<li> <a href="tqfontdatabase.html#font">TQFontDatabase::font</a>( const TQString & familyName, const TQString & style, int pointSize, const TQString & )
<li> <a href="tqfontdatabase.html#isBitmapScalable">TQFontDatabase::isBitmapScalable</a>( const TQString & family, const TQString & style, const TQString & ) const
<li> <a href="tqfontdatabase.html#isFixedPitch">TQFontDatabase::isFixedPitch</a>( const TQString & family, const TQString & style, const TQString & ) const
<li> <a href="tqfontdatabase.html#isScalable">TQFontDatabase::isScalable</a>( const TQString & family, const TQString & style, const TQString & ) const
<li> <a href="tqfontdatabase.html#isSmoothlyScalable">TQFontDatabase::isSmoothlyScalable</a>( const TQString & family, const TQString & style, const TQString & ) const
<li> <a href="tqfontdatabase.html#italic">TQFontDatabase::italic</a>( const <a href="tqstring.html">TQString</a> & family, const TQString & style, const TQString & ) const
<li> <a href="tqfontdatabase.html#pointSizes">TQFontDatabase::pointSizes</a>( const TQString & family, const TQString & style, const TQString & )
<li> <a href="tqfontdatabase.html#smoothSizes">TQFontDatabase::smoothSizes</a>( const TQString & family, const TQString & style, const TQString & )
<li> <a href="tqfontdatabase.html#styles">TQFontDatabase::styles</a>( const TQString & family, const TQString & ) const
<li> <a href="tqfontdatabase.html#weight">TQFontDatabase::weight</a>( const TQString & family, const TQString & style, const TQString & ) const
<li> <a href="tqlabel.html#autoResize">TQLabel::autoResize</a>() const
<li> <a href="tqlabel.html#setAutoResize">TQLabel::setAutoResize</a>( bool enable )
<li> <a href="tqlistbox.html#cellHeight">TQListBox::cellHeight</a>( int i ) const
<li> TQListBox::cellHeight() const
<li> <a href="tqlistbox.html#cellWidth">TQListBox::cellWidth</a>() const
<li> <a href="tqlistbox.html#findItem">TQListBox::findItem</a>( int yPos ) const
<li> <a href="tqlistbox.html#inSort">TQListBox::inSort</a>( const <a href="tqlistboxitem.html">TQListBoxItem</a> *lbi )
<li> TQListBox::inSort( const <a href="tqstring.html">TQString</a> & text )
<li> <a href="tqlistbox.html#itemYPos">TQListBox::itemYPos</a>( int index, int *yPos ) const
<li> <a href="tqlistbox.html#numCols">TQListBox::numCols</a>() const
<li> <a href="tqlistbox.html#totalHeight">TQListBox::totalHeight</a>() const
<li> <a href="tqlistbox.html#totalWidth">TQListBox::totalWidth</a>() const
<li> <a href="tqlistboxitem.html#current">TQListBoxItem::current</a>() const
<li> <a href="tqlistboxitem.html#selected">TQListBoxItem::selected</a>() const
<li> <a href="tqlistview.html#removeItem">TQListView::removeItem</a>( <a href="tqlistviewitem.html">TQListViewItem</a> *item )
<li> <a href="tqlistviewitem.html#removeItem">TQListViewItem::removeItem</a>( TQListViewItem *item )
<li> <a href="tqmainwindow.html#addToolBar">TQMainWindow::addToolBar</a>( <a href="tqdockwindow.html">TQDockWindow</a> *, Dock = DockTop, bool newLine = FALSE )
<li> TQMainWindow::addToolBar( TQDockWindow *, const TQString & label, Dock = DockTop, bool newLine = FALSE )
<li> <a href="tqmainwindow.html#lineUpToolBars">TQMainWindow::lineUpToolBars</a>( bool keepNewLines = FALSE )
<li> <a href="tqmainwindow.html#moveToolBar">TQMainWindow::moveToolBar</a>( TQDockWindow *, Dock = DockTop )
<li> TQMainWindow::moveToolBar( TQDockWindow *, Dock, bool nl, int index, int extraOffset = -1 )
<li> <a href="tqmainwindow.html#removeToolBar">TQMainWindow::removeToolBar</a>( TQDockWindow *)
<li> <a href="tqmainwindow.html#setToolBarsMovable">TQMainWindow::setToolBarsMovable</a>( bool )
<li> <a href="tqmainwindow.html#toolBarPositionChanged">TQMainWindow::toolBarPositionChanged</a>( <a href="tqtoolbar.html">TQToolBar</a> *)
<li> <a href="tqmainwindow.html#toolBarsMovable">TQMainWindow::toolBarsMovable</a>() const
<li> <a href="tqmessagebox.html#message">TQMessageBox::message</a>( const <a href="tqstring.html">TQString</a> & caption, const TQString & text, const TQString & buttonText = <a href="tqstring.html#TQString-null">TQString::null</a>, <a href="tqwidget.html">TQWidget</a> *parent = 0, const char *= 0 )
<li> <a href="tqmessagebox.html#query">TQMessageBox::query</a>( const TQString & caption, const TQString & text, const TQString & yesButtonText = TQString::null, const TQString & noButtonText = TQString::null, TQWidget *parent = 0, const char *= 0 )
<li> <a href="tqmessagebox.html#standardIcon">TQMessageBox::standardIcon</a>( Icon icon, GUIStyle style )
<li> <a href="tqregexp.html#match">TQRegExp::match</a>( const TQString & str, int index = 0, int *len = 0, bool indexIsStart = TRUE ) const
<li> <a href="tqscrollview.html#childIsVisible">TQScrollView::childIsVisible</a>( TQWidget *child )
<li> <a href="tqscrollview.html#showChild">TQScrollView::showChild</a>( TQWidget *child, bool show = TRUE )
<li> <a href="tqsimplerichtext.html#draw">TQSimpleRichText::draw</a>( <a href="tqpainter.html">TQPainter</a> *p, int x, int y, const <a href="tqregion.html">TQRegion</a> & clipRegion, const <a href="tqcolorgroup.html">TQColorGroup</a> & cg, const <a href="tqbrush.html">TQBrush</a> *paper = 0 ) const
<li> <a href="tqstring.html#ascii">TQString::ascii</a>() const
<li> <a href="tqstring.html#data">TQString::data</a>() const
<li> <a href="tqstring.html#setExpand">TQString::setExpand</a>( uint index, <a href="tqchar.html">TQChar</a> c )
<li> <a href="tqstyle.html#defaultFrameWidth">TQStyle::defaultFrameWidth</a>() const
<li> <a href="tqstyle.html#scrollBarExtent">TQStyle::scrollBarExtent</a>() const
<li> <a href="tqstyle.html#tabbarMetrics">TQStyle::tabbarMetrics</a>( const <a href="tqwidget.html">TQWidget</a> *t, int & hf, int & vf, int & ov ) const
<li> <a href="tqtabdialog.html#isTabEnabled">TQTabDialog::isTabEnabled</a>( const char *name ) const
<li> <a href="tqtabdialog.html#selected">TQTabDialog::selected</a>( const <a href="tqstring.html">TQString</a> & )
<li> TQTabDialog::selected( const TQString & tabLabel )
<li> <a href="tqtabdialog.html#setTabEnabled">TQTabDialog::setTabEnabled</a>( const char *name, bool enable )
<li> <a href="tqtextstream.html#TQTextStream">TQTextStream::TQTextStream</a>( TQString & str, int filemode )
<li> <a href="tqtoolbar.html#TQToolBar">TQToolBar::TQToolBar</a>( const TQString & label, <a href="tqmainwindow.html">TQMainWindow</a> *, ToolBarDock = DockTop, bool newLine = FALSE, const char *name = 0 )
<li> <a href="tqtooltip.html#enabled">TQToolTip::enabled</a>()
<li> <a href="tqtooltip.html#setEnabled">TQToolTip::setEnabled</a>( bool enable )
<li> <a href="tqtranslator.html#find">TQTranslator::find</a>( const char *context, const char *sourceText, const char *comment = 0 ) const
<li> <a href="tqtranslator.html#insert">TQTranslator::insert</a>( const char *context, const char *sourceText, const <a href="tqstring.html">TQString</a> & translation )
<li> <a href="tqtranslator.html#remove">TQTranslator::remove</a>( const char *context, const char *sourceText )
<li> <a href="tquridrag.html#setFilenames">TQUriDrag::setFilenames</a>( const <a href="tqstringlist.html">TQStringList</a> & fnames )
<li> <a href="tqwidget.html#backgroundColor">TQWidget::backgroundColor</a>() const
<li> <a href="tqwidget.html#backgroundPixmap">TQWidget::backgroundPixmap</a>() const
<li> <a href="tqwidget.html#iconify">TQWidget::iconify</a>()
<li> <a href="tqwidget.html#setBackgroundColor">TQWidget::setBackgroundColor</a>( const <a href="tqcolor.html">TQColor</a> & c )
<li> <a href="tqwidget.html#setBackgroundPixmap">TQWidget::setBackgroundPixmap</a>( const <a href="tqpixmap.html">TQPixmap</a> & pm )
<li> <a href="tqwidget.html#setFont">TQWidget::setFont</a>( const <a href="tqfont.html">TQFont</a> & f, bool )
<li> <a href="tqwidget.html#setPalette">TQWidget::setPalette</a>( const <a href="tqpalette.html">TQPalette</a> & p, bool )
<li> <a href="tqwizard.html#setFinish">TQWizard::setFinish</a>( <a href="tqwidget.html">TQWidget</a> *, bool )
<li> <a href="tqxmlinputsource.html#TQXmlInputSource">TQXmlInputSource::TQXmlInputSource</a>( <a href="tqfile.html">TQFile</a> & file )
<li> TQXmlInputSource::TQXmlInputSource( <a href="tqtextstream.html">TQTextStream</a> & stream )
<li> <a href="tqxmlreader.html#parse">TQXmlReader::parse</a>( const <a href="tqxmlinputsource.html">TQXmlInputSource</a> & input )
</ul>
<p> Additionally, these preprocessor directives have been removed:
<p> <ul>
<li> <tt>#define strlen tqstrlen</tt>
<li> <tt>#define strcpy qstrcpy</tt>
<li> <tt>#define strcmp qstrcmp</tt>
<li> <tt>#define strncmp tqstrncmp</tt>
<li> <tt>#define stricmp tqstricmp</tt>
<li> <tt>#define strnicmp tqstrnicmp</tt>
</ul>
<p> See the changes-3.0.0 document for an explanation of why this had to be done.
You might have been relying on the non-portable and unpredictable behavior
resulting from these directives. We strongly recommend that you either make
use of the safe qstr* variants directly or ensure that no 0 pointer is
passed to the standard C functions in your code base.
<p> <h2> Collection Class Renaming
</h2>
<a name="6"></a><p> The classes TQArray, TQCollection, TQList, TQListIterator, TQQueue, TQStack
and TQVector have been renamed as per the following table. The original
names are no longer avaialable.
<p> <center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">Old Name <th valign="top">New Name <th valign="top">New Header File
<tr bgcolor="#f0f0f0"> <td valign="top">TQArray <td valign="top"><a href="tqmemarray.html">TQMemArray</a> <td valign="top"><tt><tqmemarray.h></tt>
<tr bgcolor="#d0d0d0"> <td valign="top">TQCollection <td valign="top"><a href="tqptrcollection.html">TQPtrCollection</a> <td valign="top"><tt><tqptrcollection.h></tt>
<tr bgcolor="#f0f0f0"> <td valign="top">TQList <td valign="top"><a href="tqptrlist.html">TQPtrList</a> <td valign="top"><tt><tqptrlist.h></tt>
<tr bgcolor="#d0d0d0"> <td valign="top">TQListIterator <td valign="top"><a href="tqptrlistiterator.html">TQPtrListIterator</a> <td valign="top"><tt><tqptrlist.h></tt>
<tr bgcolor="#f0f0f0"> <td valign="top">TQQueue <td valign="top"><a href="tqptrqueue.html">TQPtrQueue</a> <td valign="top"><tt><tqptrqueue.h></tt>
<tr bgcolor="#d0d0d0"> <td valign="top">TQStack <td valign="top"><a href="tqptrstack.html">TQPtrStack</a> <td valign="top"><tt><tqptrstack.h></tt>
<tr bgcolor="#f0f0f0"> <td valign="top">TQVector <td valign="top"><a href="tqptrvector.html">TQPtrVector</a> <td valign="top"><tt><tqptrvector.h></tt>
</table></center>
<p> <h2> <a href="tqbuttongroup.html">TQButtonGroup</a>
</h2>
<a name="7"></a><p> In TQt 2.x, the function <a href="tqbuttongroup.html#selected">TQButtonGroup::selected</a>() returns the selected
<em>radio</em> button (<a href="tqradiobutton.html">TQRadioButton</a>). In TQt 3.0, it returns the selected <em>toggle</em> button (<a href="tqbutton.html#toggleButton-prop">TQButton::toggleButton</a>), a more general concept.
This might affect programs that use TQButtonGroups that contain a
mixture of radio buttons and non-radio (e.g. <a href="tqcheckbox.html">TQCheckBox</a>) toggle buttons.
<p> <h2> <a href="tqdate.html">TQDate</a>
</h2>
<a name="8"></a><p> Two TQDate member functions that were virtual in TQt 2.0 are not virtual
in TQt 3.0. This is only relevant if you subclassed TQDate and
reimplemented these functions:
<p> <ul>
<li> <a href="tqstring.html">TQString</a> <a href="tqdate.html#monthName">TQDate::monthName</a>( int month ) const
<li> TQString <a href="tqdate.html#dayName">TQDate::dayName</a>( int weekday ) const
</ul>
<p> In addition to no longer being virtual, TQDate::monthName() and
TQDate::dayName() have been renamed <a href="tqdate.html#shortMonthName">TQDate::shortMonthName</a>() and
<a href="tqdate.html#shortDayName">TQDate::shortDayName</a>() and have been made static (as they should had
been in the first place). The old names are still provided for source
compatibility.
<p> <h2> <a href="tqfiledialog.html">TQFileDialog</a>
</h2>
<a name="9"></a><p> If the mode was not set explicitly, and the user entered a
non-existent file, the dialog would accept this. In TQt 3.x, you must
set the mode, e.g. setMode(TQFileDialog::AnyFile), to get the same
behavior.
<p> <h2> <a href="tqfont.html">TQFont</a>
</h2>
<a name="10"></a><p> The internals of TQFont have changed significantly between TQt 2.2 and
TQt 3.0, to give better Unicode support and to make developing
internationalized applications easier. The original API has been
preserved with minimal changes. The CharSet enum and its related
functions have disappeared. This is because TQt now handles all charset
related issues internally, and removes this burden from the developer.
<p> If you used the CharSet enum or its related functions, e.g
TQFont::charSet() or TQFont::setCharSet(), just remove them from your
code. There are a few functions that took a TQFont::CharSet as a
parameter; in these cases simply remove the charset from the
parameter list.
<p> <h2> <a href="tqinputdialog.html">TQInputDialog</a>
</h2>
<a name="11"></a><p> The two static getText(...) methods in TQInputDialog have been merged.
The <tt>echo</tt> parameter is the third parameter and defaults to
TQLineEdit::Normal.
<p> If you used calls to <a href="tqinputdialog.html#getText">TQInputDialog::getText</a>(...) that provided more
than the first two required parameters you will must add a value
for the <tt>echo</tt> parameter.
<p> <h2> <a href="tqlayout.html">TQLayout</a> and Other Abstract Layout Classes
</h2>
<a name="12"></a><p> The definitions of <a href="tqglayoutiterator.html">TQGLayoutIterator</a>, <a href="tqlayout.html">TQLayout</a>, <a href="tqlayoutitem.html">TQLayoutItem</a>, <a href="tqlayoutiterator.html">TQLayoutIterator</a>, <a href="tqspaceritem.html">TQSpacerItem</a> and <a href="tqwidgetitem.html">TQWidgetItem</a> have been moved from <tt><tqabstractlayout.h></tt> to <tt><tqlayout.h></tt>. The header <tt><tqabstractlayout.h></tt> has been removed.
<p> <h2> <a href="tqlistviewitem.html">TQListViewItem</a>
</h2>
<a name="13"></a><p> The paintBranches() function in TQt 2.x had a GUIStyle parameter; this
has been dropped for TQt 3.x since GUI style is handled by the new
style engine (See <a href="tqstyle.html">TQStyle</a>.)
<p> <h2> <a href="tqmoveevent.html">TQMoveEvent</a>
</h2>
<a name="14"></a><p> In TQt 2.x, the function <a href="tqmoveevent.html#pos">TQMoveEvent::pos</a>() returned the position of the
widget in its parent widget, including the window frame. In TQt 3.0,
it returns the new position of the widget, excluding window frame for
top level widgets.
<p> <h2> TQMultiLineEdit
</h2>
<a name="15"></a><p> The TQMultiLineEdit was a simple editor widget in previous TQt versions.
Since TQt 3.0 includes a new richtext engine, which also supports
editing, TQMultiLineEdit is obsolete. For the sake of compatibility
TQMultiLineEdit is still provided. It is now a subclass of <a href="tqtextedit.html">TQTextEdit</a>
which wraps the old TQMultiLineEdit so that it is mostly source
compatible to keep old applications working.
<p> For new applications and when maintaining existing applications we
recommend that you use TQTextEdit instead of TQMultiLineEdit wherever
possible.
<p> Although most of the old TQMultiLineEdit API is still available, there
is one important difference. The old TQMultiLineEdit operated in terms
of lines, whereas TQTextEdit operates in terms of paragraphs. This is
because lines change all the time during wordwrap, whereas paragraphs
remain paragraphs. The consequence of this change is that functions
which previously operated on lines, e.g. numLines(), textLine(), etc.,
now work on paragraphs.
<p> Also the function getString() has been removed since it
published the internal data structure.
<p> In most cases, applications that used TQMultiLineEdit will continue to
work without problems. Applications that worked in terms of lines may
require some porting.
<p> The source code for the old 2.x version of TQMultiLineEdit can be found
in <tt>$TQTDIR/src/attic/qtmultilineedit.h/cpp</tt>. Note that the class has
been renamed to TQtMultiLineEdit to avoid name clashes. If you really
need to keep compatibility with the old TQMultiLineEdit, simply include
this class in your project and rename TQMultiLineEdit to
TQtMultiLineEdit throughout.
<p> <h2> <a href="tqprinter.html">TQPrinter</a>
</h2>
<a name="16"></a><p> TQPrinter has undergone some changes, to make it more flexible and
to ensure it has the same runtime behaviour on both Unix and Windows. In 2.x,
TQPrinter behaved differently on Windows and Unix, when using view
transformations on the <a href="tqpainter.html">TQPainter</a>. This has changed now, and TQPrinter
behaves consistently across all platforms. A compatibilty mode has been
added that forces the old behaviour, to ease porting from TQt 2.x
to TQt 3.x. This compatibilty mode can be enabled by passing the
TQPrinter::Compatible flag to the TQPrinter constructor.
<p> On X11, TQPrinter used to generate encapsulated postscript when
fullPage() was TRUE and only one page was printed. This does not
happen by default anymore, providing a more consistent printing output.
<p> <h2> <a href="tqregexp.html">TQRegExp</a>
</h2>
<a name="17"></a><p> The <a href="tqregexp.html">TQRegExp</a> class has been rewritten to support many of the features of Perl
regular expressions. Both the <a href="tqregexp.html#regular-expression">regular expression</a> syntax and the TQRegExp
interface have been modified.
<p> Be also aware that <tt><tqregexp.h></tt> is no longer included
automatically when you include <tt><tqstringlist.h></tt>. See
<a href="#Headers">above</a> for details.
<p>
<p> <h3> New special characters
</h3>
<a name="17-1"></a><p> There are five new special characters: <tt>(</tt>, <tt>)</tt>, <tt>{</tt>,
<tt>|</tt> and <tt>}</tt> (parentheses, braces and pipe). When porting old
regular expressions, you must add <tt>\</tt> (backslash) in front of any
of these (actually, <tt>\\</tt> in C++ strings), unless it is already
there.
<p> Example: Old code like
<pre>
<a href="tqregexp.html">TQRegExp</a> rx( "([0-9|]*\\)" ); // works in TQt 2.x
</pre>
should be converted into
<pre>
<a href="tqregexp.html">TQRegExp</a> rx( "\\([0-9\\|]*\\)" ); // works in TQt 2.x and 3.x
</pre>
(Within character classes, the backslash is not necessary in front of certain
characters, e.g. <tt>|</tt>, but it doesn't hurt.)
<p> Wildcard patterns need no conversion. Here are two examples:
<pre>
<a href="tqregexp.html">TQRegExp</a> wild( "(*.*)" );
wild.<a href="tqregexp.html#setWildcard">setWildcard</a>( TRUE );
</pre>
<pre>
// TRUE as third argument means wildcard
<a href="tqregexp.html">TQRegExp</a> wild( "(*.*)", FALSE, TRUE );
</pre>
However, when they are used, make sure to use <a href="tqregexp.html#exactMatch">TQRegExp::exactMatch</a>()
rather than the obsolete <a href="tqregexp.html#match">TQRegExp::match</a>(). TQRegExp::match(), like
TQRegExp::find(), tries to find a match somewhere in the target
string, while TQRegExp::exactMatch() tries to match the whole target
string.
<p> <h3> <a href="tqregexp.html#operator-eq">TQRegExp::operator=</a>()
</h3>
<a name="17-2"></a><p> This function has been replaced by <a href="tqregexp.html#setPattern">TQRegExp::setPattern</a>() in TQt 2.2.
Old code such as
<pre>
<a href="tqregexp.html">TQRegExp</a> rx( "alpha" );
rx.<a href="tqregexp.html#setCaseSensitive">setCaseSensitive</a>( FALSE );
rx.<a href="tqregexp.html#setWildcard">setWildcard</a>( TRUE );
rx = "beta";
</pre>
still compiles with TQt 3, but produces a different result (the case sensitivity
and wildcard options are forgotten). This way,
<pre>
rx = "beta";
</pre>
is the same as
<pre>
rx = TQRegExp( "beta" );
</pre>
which is what one expects.
<p> <h3> TQRegExp::match()
</h3>
<a name="17-3"></a><p> The following function is now obsolete, as it has an unwieldy
parameter list and was poorly named:
<ul>
<li> bool <a href="tqregexp.html#match">TQRegExp::match</a>( const <a href="tqstring.html">TQString</a> & str, int index = 0,
int * len = 0, bool indexIsStart = TRUE ) const
</ul>
It will be removed in a future version of TQt. Its <a href="tqregexp.html#match">documentation</a> explains how to replace it.
<p> <h3> TQRegExp::find()
</h3>
<a name="17-4"></a><p> This function was removed, after a brief appearance in TQt 2.2. Its
name clashed with <a href="tqstring.html#find">TQString::find</a>(). Use <a href="tqregexp.html#search">TQRegExp::search</a>() or <a href="tqstring.html#find">TQString::find</a>() instead.
<p> <h3> <a href="tqstring.html#findRev">TQString::findRev</a>() and <a href="tqstring.html#contains">TQString::contains</a>()
</h3>
<a name="17-5"></a><p> <a href="tqstring.html#findRev">TQString::findRev</a>()'s and <a href="tqstring.html#contains">TQString::contains</a>()'s semantics have changed
between 2.0 and 3.0 to be more consistent with the other overloads.
<p> For example,
<pre>
TQString( "" ).contains( TQRegExp("") )
</pre>
returns 1 in TQt 2.0; it returns 0 in TQt 3.0. Also, "^" now really means
start of input, so
<pre>
TQString( "Heisan Hoppsan" ).contains( TQRegExp("^.*$") )
</pre>
returns 1, not 13 or 14.
<p> This change affect very few existing programs.
<p> <h3> <a href="tqstring.html#replace">TQString::replace</a>()
</h3>
<a name="17-6"></a><p> With TQt 1.0 and 2.0, a <a href="tqstring.html">TQString</a> is converted implicitly into a <a href="tqregexp.html">TQRegExp</a>
as the first argument to TQString::replace():
<pre>
<a href="tqstring.html">TQString</a> text = fetch_it_from_somewhere();
text.<a href="tqstring.html#replace">replace</a>( TQString("[A-Z]+"), "" );
</pre>
With TQt 3.0, the compiler gives an error. The solution is to use a
TQRegExp cast:
<pre>
text.replace( TQRegExp("[A-Z]+"), "" );
</pre>
This change makes it possible to introduce a
TQString::replace(TQString, TQString) overload in a future version of TQt
without breaking source compatibility.
<p> <h2> TQSemiModal
</h2>
<a name="18"></a><p> The TQSemiModal class is now obsolete. You should call show() on a
modal dialog instead.
<p> <h2> TQSortedList
</h2>
<a name="19"></a><p> The TQSortedList class is now obsolete. Consider using a <a href="tqdict.html">TQDict</a>, a <a href="tqmap.html">TQMap</a>
or a plain <a href="tqptrlist.html">TQPtrList</a> instead.
<p> <h2> TQTableView
</h2>
<a name="20"></a><p> The TQTableView class has been obsoleted and is no longer a part of the
TQt API. Either use the powerful <a href="tqtable.html">TQTable</a> class or the simplistic
<a href="tqgridview.html">TQGridView</a> in any new code you create. If you really need the old table
view for compatibility you can find it in <tt>$TQTDIR/src/attic/qttableview.{cpp,h}</tt>. Note that the class has been
renamed from TQTableView to TQtTableView to avoid name clashes. To use
it, simply include it in your project and rename TQTableView to
TQtTableView throughout.
<p> <h2> <a href="tqtoolbutton.html">TQToolButton</a>
</h2>
<a name="21"></a><p> The <a href="tqtoolbutton.html">TQToolButton</a> class used to distinguish between "on" and "off"
icons. In 3.0, this mechanism was moved into the <a href="tqiconset.html">TQIconSet</a> class
(see <a href="tqiconset.html#State-enum">TQIconSet::State</a>).
<p> The two TQToolButton::onIconSet and TQToolButton::offIconSet properties
have been removed, together with the following two functions as well.
<p> <ul>
<li> void TQToolButton::setIconSet ( const TQIconSet & set, bool on )
<li> TQIconSet TQToolButton::iconSet ( bool on ) const
</ul>
<p> New code should use the following functions instead:
<p> <ul>
<li> void <a href="tqtoolbutton.html#setIconSet">TQToolButton::setIconSet</a>( const TQIconSet & set )
<li> TQIconSet <a href="tqtoolbutton.html#iconSet">TQToolButton::iconSet</a>() const
</ul>
<p> <h2> <a href="tqtextstream.html">TQTextStream</a>
</h2>
<a name="22"></a><p> The global TQTextStream manipulators setw(), setfill() and setprecison()
were renamed to qSetW(), qSetFill() and qSetPrecision() to avoid conflicts
with <tt><iostream.h></tt>. If you used them, you must rename the occurrences to
the new names.
<p> <h2> <a href="tqtranslator.html">TQTranslator</a>
</h2>
<a name="23"></a><p> The <a href="tqtranslator.html">TQTranslator</a> class was extended in TQt 2.2, and these extensions
lead to a new interface. This interface is used mainly by translation
tools (for example, <a href="linguist-manual.html">TQt
Linguist</a>). For source compatibility, no member function was
effectively removed. The <a href="tqtranslator.html">TQTranslator</a> documentation points out
which functions are obsolete.
<p> This function is no longer virtual:
<p> <ul>
<li> <a href="tqstring.html">TQString</a> <a href="tqtranslator.html#find">TQTranslator::find</a>( const char * context,
const char * sourceText ) const
</ul>
<p> If you have a class that inherits TQTranslator and which reimplements
TQTranslator::find(), you should reimplement <a href="tqtranslator.html#findMessage">TQTranslator::findMessage</a>() instead.
In fact, find() is now defined in terms of findMessage(). By doing the
conversion, you will also gain support for translator comments and for any
future extensions.
<p> <h2> <a href="tqwidget.html">TQWidget</a>
</h2>
<a name="24"></a><p> <a href="tqwidget.html#backgroundColor">TQWidget::backgroundColor</a>(), <a href="tqwidget.html#setBackgroundColor">TQWidget::setBackgroundColor</a>(),
<a href="tqwidget.html#backgroundPixmap">TQWidget::backgroundPixmap</a>() and <a href="tqwidget.html#setBackgroundPixmap">TQWidget::setBackgroundPixmap</a>() have
often been the source of much confusion in previous releases. TQt 3.0
addresses this by obsoleting these functions and by replacing them
with eight new functions: <a href="tqwidget.html#eraseColor">TQWidget::eraseColor</a>(),
<a href="tqwidget.html#setEraseColor">TQWidget::setEraseColor</a>(), <a href="tqwidget.html#erasePixmap">TQWidget::erasePixmap</a>(),
<a href="tqwidget.html#setErasePixmap">TQWidget::setErasePixmap</a>(), <a href="tqwidget.html#paletteBackgroundColor">TQWidget::paletteBackgroundColor</a>(),
<a href="tqwidget.html#setPaletteBackgroundColor">TQWidget::setPaletteBackgroundColor</a>(),
<a href="tqwidget.html#paletteBackgroundPixmap">TQWidget::paletteBackgroundPixmap</a>() and
<a href="tqwidget.html#setPaletteBackgroundPixmap">TQWidget::setPaletteBackgroundPixmap</a>(). See their documentation for
details.
<p> <h2> TQXml Classes
</h2>
<a name="25"></a><p> <h3> <a href="tqxmlinputsource.html">TQXmlInputSource</a>
</h3>
<a name="25-1"></a><p> The semantics of TQXmlInputSource has changed slightly. This change
only affects code that parses the same data from the same input source
multiple times. In such cases you must call
<a href="tqxmlinputsource.html#reset">TQXmlInputSource::reset</a>() before the second call to
<a href="tqxmlsimplereader.html#parse">TQXmlSimpleReader::parse</a>().
<p> So code like
<pre>
<a href="tqxmlinputsource.html">TQXmlInputSource</a> source( &xmlFile );
<a href="tqxmlsimplereader.html">TQXmlSimpleReader</a> reader;
...
reader.<a href="tqxmlsimplereader.html#parse">parse</a>( source );
...
reader.<a href="tqxmlsimplereader.html#parse">parse</a>( source );
</pre>
must be changed to
<pre>
<a href="tqxmlinputsource.html">TQXmlInputSource</a> source( &xmlFile );
<a href="tqxmlsimplereader.html">TQXmlSimpleReader</a> reader;
...
reader.<a href="tqxmlsimplereader.html#parse">parse</a>( source );
...
source.<a href="tqxmlinputsource.html#reset">reset</a>();
reader.<a href="tqxmlsimplereader.html#parse">parse</a>( source );
</pre>
<p> <h3> <a href="tqxmllocator.html">TQXmlLocator</a>
</h3>
<a name="25-2"></a><p> Due to some internal changes, it was necessary to clean-up the semantics of
TQXmlLocator: this class is now an abstract class. This shouldn't cause
any problems, since programmers usually used the TQXmlLocator that was
reported by <a href="tqxmlcontenthandler.html#setDocumentLocator">TQXmlContentHandler::setDocumentLocator</a>(). If you used this
class in some other way, you must adjust your code to use the
TQXmlLocator that is reported by the
TQXmlContentHandler::setDocumentLocator() function.
<p> <h2> Asynchronous I/O Classes
</h2>
<a name="26"></a><p> TQASyncIO, TQDataSink, TQDataSource, TQIODeviceSource and TQDataPump were
used internally in previous versions of TQt, but are not used anymore.
They are now obsolete.
<p> <h2> Transparent widgets
</h2>
<a name="27"></a><p> In TQt 2.x, the AutoMask property was used to obtain a
transparent-looking widget. In general, this approach is slow and
processor hungry. TQt 3.0 uses the BackgroundOrigin which provides
vastly improved performance and more flexibility in most cases. The
few classes for which the AutoMask property is still the best approach
are <a href="tqcheckbox.html">TQCheckBox</a>, <a href="tqcombobox.html">TQComboBox</a>, <a href="tqpushbutton.html">TQPushButton</a>, <a href="tqradiobutton.html">TQRadioButton</a> and <a href="tqtabwidget.html">TQTabWidget</a>.
<p> <h2> Bezier Curves
</h2>
<a name="28"></a><p> The function names for Bezier curves in <a href="tqpainter.html">TQPainter</a> and <a href="tqpointarray.html">TQPointArray</a> have
been corrected. They now properly reflect their cubic form instead of
a quadratic one. If you have been using either
TQPainter::drawQuadBezier() or TQPointArray::quadBezier() you must
replace these calls with
<ul>
<li> void <a href="tqpainter.html#drawCubicBezier">TQPainter::drawCubicBezier</a>( const TQPointArray &, int index=0 ) and
<li> TQPointArray <a href="tqpointarray.html#cubicBezier">TQPointArray::cubicBezier</a>() const
</ul>
respectively. Neither the arguments nor the resulting curve have changed.
<p> <h2> Locale-aware String Comparisons in <a href="tqiconview.html">TQIconView</a>, <a href="tqlistbox.html">TQListBox</a>,
<a href="tqlistview.html">TQListView</a> and <a href="tqtable.html">TQTable</a>
</h2>
<a name="29"></a><p> In TQt 2.x, <a href="tqstring.html">TQString</a> only provided string comparisons using the Unicode
values of the characters of a string. This is efficient and reliable,
but it is not the appropriate order for most languages. For example,
French users expect 'é' (e acute) to be treated essentially as
'e' and not put after 'z'.
<p> In TQt 3.0, <a href="tqstring.html#localeAwareCompare">TQString::localeAwareCompare</a>() implements locale aware
string comparisions on certain platforms. The classes <a href="tqiconview.html">TQIconView</a>, <a href="tqlistbox.html">TQListBox</a>, <a href="tqlistview.html">TQListView</a> and <a href="tqtable.html">TQTable</a> now use
TQString::localeAwareCompare() instead of <a href="tqstring.html#compare">TQString::compare</a>(). If you
want to control the behaviour yourself you can always reimplement
<a href="tqiconviewitem.html#compare">TQIconViewItem::compare</a>(), <a href="tqlistbox.html#text">TQListBox::text</a>(), <a href="tqlistviewitem.html#compare">TQListViewItem::compare</a>()
or <a href="tqtableitem.html#key">TQTableItem::key</a>() as appropriate.
<p>
<!-- eof -->
<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright © 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>TQt 3.3.8</div>
</table></div></address></body>
</html>
|