0
|
1 |
Here is a list of changes in Qt from 0.91 to 0.92. Also look out
|
|
2 |
for a few new classes; QPrinter, QFileDialog, QDir and QFileInfo.
|
|
3 |
|
|
4 |
|
|
5 |
QApplication:
|
|
6 |
-------------
|
|
7 |
Use setMainWidget( x ), not exec( x ).
|
|
8 |
|
|
9 |
QString:
|
|
10 |
--------
|
|
11 |
upper(), lower(), stripWhiteSpace() and simplifyWhiteSpace() etc.
|
|
12 |
do NOT modify the string, instead they return a new string.
|
|
13 |
|
|
14 |
QList and QVector:
|
|
15 |
------------------
|
|
16 |
Changed argument in QList::toVector() from reference to pointer
|
|
17 |
Changed argument in QVector::toList() from reference to pointer
|
|
18 |
Removed QVector::apply()
|
|
19 |
Removed QList::apply()
|
|
20 |
|
|
21 |
QPainter:
|
|
22 |
---------
|
|
23 |
pen(), brush() and font() no longer returns references.
|
|
24 |
You cannot do this any longer:
|
|
25 |
QPainter p;
|
|
26 |
...
|
|
27 |
p.pen().setColor( red );
|
|
28 |
p.brush().setStyle( NoBrush );
|
|
29 |
Instead, set a new pen or brush:
|
|
30 |
p.setPen( red );
|
|
31 |
p.setBrush( NoBrush );
|
|
32 |
This enables us to do better optimization, particularly for complex
|
|
33 |
programs.
|
|
34 |
|
|
35 |
QFile, QFileInfo (new):
|
|
36 |
-----------------------
|
|
37 |
Removed QFile::setFileName,
|
|
38 |
QFile::isRegular => QFileInfo::isFile
|
|
39 |
QFile::isDirectory => QFileInfo::isDir
|
|
40 |
QFile::isSymLink => QFileInfo::isSymLink
|
|
41 |
|
|
42 |
Q2DMatrix/QWMatrix:
|
|
43 |
---------
|
|
44 |
Q2DMatrix has been replaced with QWMatrix (qwmatrix.h)
|
|
45 |
|
|
46 |
QPixmap:
|
|
47 |
--------
|
|
48 |
enableImageCache() renamed to setOptimization().
|
|
49 |
Optimization is now default ON. See doc for other optimization functions.
|
|
50 |
|
|
51 |
QImage:
|
|
52 |
-------
|
|
53 |
scanline() => scanLine()
|
|
54 |
|
|
55 |
QLineEdit/QLCDNumber:
|
|
56 |
---------------------
|
|
57 |
signal textChanged( char * ) => textChanged( const char * );
|
|
58 |
slot display( char * ) => display( const char * )
|
|
59 |
|
|
60 |
QCursor:
|
|
61 |
--------
|
|
62 |
hourGlassCursor => waitCursor
|
|
63 |
|
|
64 |
QButton and friends:
|
|
65 |
--------------------
|
|
66 |
QIconButton removed, setPixmap() added to QButton to replace QIconButton
|
|
67 |
|
|
68 |
QTableWidget:
|
|
69 |
-------------
|
|
70 |
Renamed to QTableView (qtablevw.h)
|
|
71 |
Using int to identify rows and columns, not long.
|
|
72 |
|
|
73 |
QRangeControl:
|
|
74 |
--------------
|
|
75 |
Using int values, not long.
|
|
76 |
|
|
77 |
QScrollBar:
|
|
78 |
-----------
|
|
79 |
Using int values, not long.
|
|
80 |
|
|
81 |
QListBox:
|
|
82 |
---------
|
|
83 |
removed setStrList(), use clear(); insertStrList( ... , 0 ); instead
|
|
84 |
|
|
85 |
QColor:
|
|
86 |
-------
|
|
87 |
setRGB => setRgb
|
|
88 |
getRGB => rgb
|
|
89 |
setHSV => setHsv
|
|
90 |
getHSV => hsv
|
|
91 |
|
|
92 |
QFontMetrics and QFontInfo:
|
|
93 |
---------------------------
|
|
94 |
Get font metrics from QWidget::fontMetrics() and QPainter::fontMetrics().
|
|
95 |
Get font info from QWidget::fontInfo() and QPainter::fontInfo().
|
|
96 |
The QFontMetrics(QFont) constructor no longer works.
|
|
97 |
We had to do these changes to support printing and Windows.
|
|
98 |
|
|
99 |
|
|
100 |
There are more changes, left out because we consider them minor and
|
|
101 |
uninteresting or because we forgot to mention them. :)
|