|
1 Qt 3.0 Beta2 is not binary compatible with Beta1, this means that any |
|
2 programs linked with Beta1 must be recompiled. |
|
3 |
|
4 Below you'll find a description of general changes in the Qt Library |
|
5 and Qt Designer followed by a detailed list of changes in the |
|
6 programming API. |
|
7 |
|
8 |
|
9 The Qt Library |
|
10 ======================================== |
|
11 |
|
12 Wacom Tablet Support |
|
13 -------------------- |
|
14 |
|
15 Support for Wacom brand tablets has been introduced on Irix and |
|
16 Windows. These devices generate a QTabletEvent that can be handled by |
|
17 QWidget::tabletEvent(). The QTabletEvent holds information about |
|
18 pressure, X and Y tilt, and which device is being used (e.g. stylus or |
|
19 eraser). Note: at present, there are known issues with the Windows |
|
20 version. |
|
21 |
|
22 Documentation |
|
23 ------------- |
|
24 |
|
25 Overall enhancements including fixed typos and the addition of several |
|
26 images and code examples. |
|
27 |
|
28 QStyle (and derived classes) |
|
29 ---------------------------- |
|
30 |
|
31 The style API has been completely rewritten in Qt 3.0. The main reason |
|
32 for doing this was because it was getting inconsistent, hard to |
|
33 maintain and extend. Most of the old 2.x functions have been replaced |
|
34 by a small set of more general functions. The new API is: |
|
35 |
|
36 - much more consistent |
|
37 - less work have to be done to create custom styles |
|
38 - easier to extend and maintain binary compatibility |
|
39 |
|
40 The old API relied upon a host of virtual functions that were |
|
41 re-implemented in the different styles. These functions were used to |
|
42 draw parts of, or entire widgets. The new API uses a small set of more |
|
43 general functions. Enumerated values are passed as parameters to these |
|
44 functions to specify which parts of a control or widget is to be drawn |
|
45 (e.g drawPrimitive( PE_ArrowUp, ...)). |
|
46 |
|
47 To create custom styles with the new API, simply subclass from the |
|
48 preferred base style and re-implement the function that draws the part |
|
49 of the widget you want to change. If you for example want to change |
|
50 the look of the arrows that are used in QWindowsStyle, subclass from |
|
51 it and re-implement the drawPrimitive() function. Your drawPrimitive() |
|
52 function may look something like this: |
|
53 |
|
54 void QMyStyle::drawPrimitive( PrimitiveElement pe, ... ) |
|
55 { |
|
56 switch( pe ) { |
|
57 case PE_ArrowUp: |
|
58 // draw up arrow |
|
59 break; |
|
60 case PE_ArrowDown: |
|
61 // draw down arrow |
|
62 break; |
|
63 default: |
|
64 // let the base class handle the rest of the drawing |
|
65 QWindowsStyle::drawPrimitive( ... ); |
|
66 break; |
|
67 } |
|
68 } |
|
69 |
|
70 For more information about the new style API, please read the QStyle |
|
71 documentation. |
|
72 |
|
73 |
|
74 Qt Designer |
|
75 ======================================== |
|
76 |
|
77 - Improved indentation algorithm for the code editor. |
|
78 - Allow multiple code editors to be open. This makes copy and paste |
|
79 much easier. |
|
80 |
|
81 |
|
82 Qt Functions |
|
83 ======================================== |
|
84 |
|
85 QCanvas |
|
86 ------- |
|
87 |
|
88 - QCanvas does not react on windowActivationChange() anymore. |
|
89 - 64 bit cleanup. |
|
90 |
|
91 QChar |
|
92 ----- |
|
93 |
|
94 - The Unicode character is stored host ordered now. Main advantage is |
|
95 that you can directly cast a QChar array to an array of unsigned shorts. |
|
96 |
|
97 QCom |
|
98 ---- |
|
99 |
|
100 - Introduced QS_OK, QS_FALSE, QE_NOINTERFACE, QE_INVALIDARG and |
|
101 QE_NOIMPL as possible QRESULT return values. |
|
102 |
|
103 QDate, QTime and QDateTime |
|
104 -------------------------- |
|
105 |
|
106 - New function for outputting free form strings and new DateFormat |
|
107 enum Qt::LocalDate. |
|
108 |
|
109 New functions: |
|
110 QString toString( const QString& format ); |
|
111 |
|
112 QDir |
|
113 ---- |
|
114 |
|
115 - entryInfoList() returns 0 for non-existing directories on Windows |
|
116 as the documentation claims and the Unix version already does. |
|
117 - On Windows, QDir tries a more failsafe way to determine the home |
|
118 directory. |
|
119 |
|
120 QDom |
|
121 ---- |
|
122 |
|
123 - QDomNode::hasChildNodes() now works as documented. |
|
124 - QDomDocument::toString() includes now namespaces in its output. |
|
125 - QDomDocument::QDomDocument() constructor now allows adding children |
|
126 to the document. |
|
127 |
|
128 QFileDialog |
|
129 ----------- |
|
130 |
|
131 - Various fixes in file type filter and handling of file names and |
|
132 directories. |
|
133 |
|
134 QEvent |
|
135 ------ |
|
136 |
|
137 - New event type DeferredDelete. See QObject changes below. |
|
138 |
|
139 QGL |
|
140 --- |
|
141 |
|
142 - Fix for Irix in respect of installing colormaps. |
|
143 - Swapped arguments of QGLColormap::setEntries() in order to be able |
|
144 to use a meaningful default argument. |
|
145 |
|
146 New class: |
|
147 QGLColormap - class for manipulating colormaps in GL index mode. |
|
148 |
|
149 QGridView |
|
150 --------- |
|
151 |
|
152 A new class that provides an abstract base for fixed-size grids. |
|
153 |
|
154 QIconSet |
|
155 -------- |
|
156 |
|
157 New function: |
|
158 void clearGenerated(); |
|
159 |
|
160 QImage |
|
161 ------ |
|
162 |
|
163 - Handlers for image formats can be dynamically loaded as a plug-in by |
|
164 using the QImageFormatInterface. |
|
165 |
|
166 QLabel |
|
167 ------ |
|
168 |
|
169 - setIndent() behaves like documented. |
|
170 |
|
171 QLineEdit |
|
172 --------- |
|
173 |
|
174 New function: |
|
175 int characterAt( int xpos, QChar *chr ) const; |
|
176 |
|
177 QLibrary |
|
178 -------- |
|
179 |
|
180 Enabled plug-in loading with static Qt library (Windows). |
|
181 |
|
182 QMovie |
|
183 ------ |
|
184 |
|
185 - Does pixmap caching now. Reduces load e.g. on the X Server in the |
|
186 case of animated gifs. |
|
187 |
|
188 QObject |
|
189 ------- |
|
190 |
|
191 - Added a deferredDelete() function that will cause the object to |
|
192 delete itself once the event loop is entered again. |
|
193 |
|
194 - A second type of destroyed signal - one that passes a pointer to |
|
195 the destroyed object as a parameter - will be emitted in QObject's |
|
196 destructor. |
|
197 |
|
198 New signal: |
|
199 void destroyed( QObject* obj ); |
|
200 |
|
201 New slot: |
|
202 void deferredDelete(); |
|
203 |
|
204 QPainter |
|
205 -------- |
|
206 |
|
207 - So far clipping had always been done in the device coordinate |
|
208 system. The newly introduced ClipMode allows clipping regions to be |
|
209 set via setClipRect() and setClipRegion() in painter coordinates. |
|
210 |
|
211 New enum: |
|
212 enum ClipMode { ClipDevice, ClipPainter }; |
|
213 |
|
214 Extended functions: |
|
215 QRegion clipRegion( ClipMode = ClipDevice ) const; |
|
216 void setClipRect( const QRect &, ClipMode = ClipDevice ) |
|
217 void setClipRect( int x, int y, int w, int h, ClipMode = ClipDevice ); |
|
218 void setClipRegion( const QRegion &, ClipMode = ClipDevice ); |
|
219 |
|
220 QPrintDialog |
|
221 ------------ |
|
222 |
|
223 - Allow overriding the default print dialog. This way it's possible |
|
224 to better cope with the variety of existing print systems (API not |
|
225 finalized, yet). |
|
226 - The dialog reads current QPrinter on every invocation now. |
|
227 |
|
228 New functions: |
|
229 static void setGlobalPrintDialog( QPrintDialog * ); |
|
230 virtual bool setupPrinters ( QListView *printers ); |
|
231 |
|
232 QPrinter |
|
233 -------- |
|
234 |
|
235 - X11 version only: Introduced Qt settings switch 'embedFonts' that |
|
236 allows disabling font embedding to reduce size of PostScript output. |
|
237 |
|
238 QProcess |
|
239 -------- |
|
240 |
|
241 - Added function to retrieve the pid (Unix) or PROCESS_INFORMATION |
|
242 (Windows) from a running process. |
|
243 - Extra parameter for environment settings in start() and launch() |
|
244 functions. |
|
245 |
|
246 New/extended functions: |
|
247 PID processIdentifier(); |
|
248 virtual bool start( QStringList *env=0 ); |
|
249 virtual bool launch( const QString& buf, QStringList *env=0 ); |
|
250 virtual bool launch( const QByteArray& buf, QStringList *env=0 ); |
|
251 |
|
252 New signal: |
|
253 void launchFinished(); |
|
254 |
|
255 QServerSocket |
|
256 ------------- |
|
257 |
|
258 - Set the SO_REUSEADDR option so that the server can be restarted. |
|
259 |
|
260 QSocket |
|
261 ------- |
|
262 |
|
263 - Make deletion of QSocket instances safe if it is in response to a |
|
264 signal emitted by the object itself. |
|
265 |
|
266 SocketDevice |
|
267 ------------ |
|
268 |
|
269 - Optional boolean parameter to be able to distinguish between |
|
270 timeout and connection closed by peer when waitForMore() returns. |
|
271 |
|
272 Extended functions: |
|
273 int waitForMore( int msecs, bool *timeout=0 ) const; |
|
274 |
|
275 QStyleSheet |
|
276 ----------- |
|
277 |
|
278 - Added helper function that escapes HTML meta-characters. |
|
279 |
|
280 New function: |
|
281 QString escape( const QString& plain); |
|
282 |
|
283 QSql |
|
284 ---- |
|
285 |
|
286 - The source of the SQL driver plug-ins have been moved to |
|
287 $QTDIR/plugins/src/sqldrivers/. |
|
288 - The postgres driver checks the version number of the server. So there is |
|
289 no need for different drivers: QPSQL6 no longer exists -- use QPSQL7 |
|
290 instead. |
|
291 - Postgres driver supports now 3 PostgreSQL back ends: 6.x, 7.0.x and 7.1.x |
|
292 - Better handling of errors coming from the database. |
|
293 - SQL driver for Microsoft SQL Server and Sybase Adaptive Server (TDS). |
|
294 - Added caching for forward-only cursors. |
|
295 - Avoid crashes on the unloading of SQL plugins that occurred on some |
|
296 platforms. |
|
297 - QSqlResults can be forward only to improve performance |
|
298 (QSqlResult::setForwardOnly()). |
|
299 - QSqlDatabase passes the port number to the SQL driver. |
|
300 |
|
301 QTable |
|
302 ------ |
|
303 |
|
304 - No longer calls processEvents() in columnWidthChanged() and |
|
305 rowHeightChanged() in order to avoid any side effects. |
|
306 - Ensure that mousePressEvent doesn't emit contextMenuRequested(), |
|
307 unless it is called from the contextMenu event handler. |
|
308 - For more useful subclassing the new functions listed below have |
|
309 been added. |
|
310 |
|
311 New functions: |
|
312 bool isEditing() const; |
|
313 EditMode editMode() const; |
|
314 int currEditRow() const; |
|
315 int currEditCol() const; |
|
316 |
|
317 QTextCodec |
|
318 ---------- |
|
319 |
|
320 - Fixes for characters in the 0x80..0xff range. |
|
321 |
|
322 QTextEdit |
|
323 --------- |
|
324 |
|
325 - The rich text engine has seen many internal improvements and |
|
326 additions to the QTextEdit class. |
|
327 |
|
328 New functions: |
|
329 virtual void scrollToBottom(); |
|
330 virtual void removeSelection( int selNum = 0 ); |
|
331 virtual bool getParagraphFormat(...); |
|
332 virtual void insertParagraph( const QString &text, int para ); |
|
333 virtual void removeParagraph( int para ); |
|
334 virtual void insertAt( const QString &text, int para, int index ); |
|
335 QRect paragraphRect( int para ) const; |
|
336 int paragraphAt( const QPoint &pos ) const; |
|
337 int charAt( const QPoint &pos, int *para ) const; |
|
338 |
|
339 QUrlOperator |
|
340 ------------ |
|
341 |
|
342 - More precise error messages. |
|
343 |
|
344 QWidget |
|
345 ------- |
|
346 |
|
347 - Added a read-only property containing the widget's background brush. |
|
348 |
|
349 New function: |
|
350 virtual const QBrush& backgroundBrush() const; |
|
351 |
|
352 QWMatrix |
|
353 -------- |
|
354 |
|
355 - New functions for mapping of geometric elements via matrix |
|
356 multiplication semantics. |
|
357 |
|
358 New functions: |
|
359 QRect mapRect( const QRect & ); |
|
360 QPoint operator * (const QPoint & ) const; |
|
361 QRegion operator * (const QRect & ) const; |
|
362 QRegion operator * (const QRegion & ) const; |
|
363 QPointArray operator * ( const QPointArray &a ) const; |