1 Qt 3.1 introduces many significant new features and many improvements
2 over the 3.0.x series. This file provides an overview of the main
3 changes since version 3.0.5. For further details see the online
4 documentation which is included in this distribution, and also
5 available at http://qt.nokia.com/doc/.
7 The Qt version 3.1 series is binary compatible with the 3.0.x series:
8 applications compiled for 3.0 will continue to run with 3.1.
11 ****************************************************************************
13 ****************************************************************************
15 Qt Script for Applications
16 --------------------------
17 Qt 3.1 is the first Qt release that can be used with Qt Script for
18 Applications (QSA). QSA provides a scripting engine, an IDE for
19 creating and editing scripts and script forms, and bindings to the Qt
20 API. Script-enabling a Qt application is not difficult and the IDE
21 makes it easy for resellers and end-users to write their own scripts.
22 QSA is due for release after Qt 3.1.
27 Qt Designer, the visual GUI builder, has undergone several usability
28 improvements. A new dialog for creating and editing signals and slots
29 connections has been created: it is much easier to use and much faster
30 for setting up multiple connections. The widgets are now presented in
31 an easy-to-use toolbox rather than in toolbars (although you can still
32 have the toolbars if you want). The property editor now handles common
33 properties in multiple widgets simultaneously. By popular demand,
34 WYSIWYG support for QWidgetStack has been added. Rich text is now
35 supported with a rich text editor. And the code editor can be used for
36 ordinary member functions as well as for slots.
41 Qt Assistant, the Qt documentation browser, can now be used with
42 custom documentation sets. This new functionality combined with the
43 new QAssistantClient class means that you can use Qt Assistant as a
44 help browser for your own applications. Qt Assistant has also been
45 enhanced by the addition of a fast full text search engine.
50 The general industry-wide move away from Motif is leaving more and
51 more companies in need of a migration solution. But converting large
52 legacy applications in one step is often impractical. To minimize
53 risks and to manage the workload companies often want to port code on
54 a module by module basis. Qt 3.1 includeds a completely new Motif
55 module that supports hybrid applications in which Qt code and Motif
56 code coexist. (This obsoletes the earlier rudimentary Qt Xt/Motif
62 With the release of Qt 3.1, customers who use Qt for Microsoft Windows
63 development can now use Qt with ActiveX. The new ActiveQt module
64 provides a simple API for COM and ActiveX. The module can be used to
65 create applications which host ActiveX controls, and also to create
66 applications that serve ActiveX controls (e.g. Internet Explorer
72 The introduction of Qt/Mac, a Mac OS X port of Qt, with Qt 3.0 has
73 proved a great success. This port has undergone many improvements in
74 Qt 3.1, especially with respect to Appearance Manager, anti-aliased
75 text and user settings. The Qt OpenGL support is greatly improved, and
76 uses the hardware-accelerated drivers.
81 Graphics, mouse and keyboard drivers can now be compiled as plugins.
86 In addition to the new additions and enhancements referred to above,
87 as with all major Qt releases, Qt 3.1 includes hundreds of
88 improvements in the existing class library. Here is a brief summary of
89 the most significant changes:
91 - QTextEdit has a new text format: LogText. This is a performance and
92 memory optimized format especially designed for the fast display of
93 large amounts of text. The format supports basic highlighting,
94 including bold and colored text.
96 - The new QSyntaxHighlighter class makes it both easy and efficient to
97 add syntax highlighting capabilities to a QTextEdit.
99 - QHttp and QFtp in earlier Qt's were implementations of the
100 QNetworkProtocol. Both have been extended to stand in their own
101 right. If you missed some flexibility in the network protocol
102 abstractions of earlier Qt's, the new QHttp and QFtp classes should
103 provide the solution.
105 - QAccel, used to handle keyboard shortcuts, now gracefully copes with
106 shortcut clashes. If a clash occurs, a new signal,
107 activatedAmbiguously(), is emitted. Classes that use QAccel, like
108 QButton and QPopupMenu, make use of this new functionality.
109 Futhermore QAccel can now handle multi-key sequences, for example,
112 - QClipboard has been extended to simplify data exchange between
115 - Thread support: almost all methods in the tools classes have been
116 made reentrant. QApplication::postEvent() and a few other methods
117 are now thread-safe if Qt is compiled as a multi-threaded library.
118 (The documentation now states if a class or function is thread-safe
121 - A QMutexLocker class has been added to simplify the locking and
122 unlocking of mutexes.
124 - Input methods: A selectionLength() function has been added to
125 QIMEvent. Japanese compositions are now handled correctly. Support
126 for AIMM based input methods (those working on non-Asian versions of
127 Win95/98/Me) has been added.
129 - Large File support: Qt's internals have been modified to support
130 Large Files (> 2GB). QFileDialog will now correctly display and
133 - SQL module: Support for prepared query execution and value binding
134 has been added. Among other benefits, this makes it possible to
135 write large BLOBs (> 2 KB) to Oracle databases, and to write Unicode
136 strings to SQL Server databases.
141 The build process has been improved:
143 - The configure script does not need QTDIR to be set anymore.
146 ****************************************************************************
148 ****************************************************************************
153 - QBackInsertIterator
163 void setVisible( bool )
164 bool isVisible() const
177 static void setStandardColor( int, QRgb )
183 void activatedAmbiguously( int id )
188 The event loop has been moved to the QEventLoop class, making it
189 easier to integrate other toolkits with Qt.
192 QEventLoop *eventLoop() const
193 void setEventLoop( QEventLoop * )
194 QString sessionKey() const
200 void clear( Mode mode )
201 bool supportsSelection() const
202 bool ownsSelection() const
203 bool ownsClipboard() const
204 QString text( Mode mode ) const
205 QString text( QCString& subtype, Mode mode ) const
206 void setText( const QString &, Mode mode )
207 QMimeSource *data( Mode mode ) const
208 void setData( QMimeSource*, Mode mode )
209 QImage image( Mode mode ) const
210 QPixmap pixmap( Mode mode ) const
211 void setImage( const QImage &, Mode mode )
212 void setPixmap( const QPixmap &, Mode mode )
218 const QRect& screenGeometry( QWidget *widget ) const
219 const QRect& screenGeometry( const QPoint &point ) const
220 const QRect& availableGeometry( int screen ) const
221 const QRect& availableGeometry( QWidget *widget ) const
222 const QRect& availableGeometry( const QPoint &point ) const
227 Large Files (> 2GB) are now correctly displayed and selected.
232 QFileInfo now supports Large Files (> 2GB) internally. To maintain
233 binary compatibility the QFileInfo API cannot be adapted before Qt 4
234 and will truncate file sizes and offsets to 4 GB.
237 bool isHidden() const
242 QFile now supports Large Files (> 2GB) internally. To maintain binary
243 compatibility the QFile API cannot be adapted before Qt 4 and will
244 truncate file sizes and offsets to 4 GB.
249 QDir now supports Large Files (> 2GB).
255 in selectionLength() const
261 void installIconFactory( QIconFactory *factory )
267 static QImage fromMimeSource( const QString& abs_name )
273 QStrList enumeratorNames( bool super ) const
274 int numEnumerators( bool super ) const
275 static bool hasMetaObject( const char *class_name )
281 bool isItemVisible( int id ) const
282 void setItemVisible( int id, bool visible )
283 Both functions are inherited by QMenuBar and QPopupMenu
288 New functions (x11 only):
289 static Qt::HANDLE x11AppRootWindow()
290 static int x11AppDepth( int screen )
291 static int x11AppCells( int screen )
292 static Qt::HANDLE x11AppRootWindow( int screen )
293 static Qt::HANDLE x11AppColormap( int screen )
294 static void *x11AppVisual( int screen )
295 static bool x11AppDefaultColormap( int screen )
296 static bool x11AppDefaultVisual( int screen )
297 static int x11AppDpiX( int )
298 static int x11AppDpiY( int )
299 static void x11SetAppDpiX( int, int )
300 static void x11SetAppDpiY( int, int )
306 void setBoundingRect( const QRect &r )
312 bool hasAlpha() const
313 static QPixmap fromMimeSource( const QString& abs_name )
319 void setMargins( uint top, uint left, uint bottom, uint right )
320 void margins( uint *top, uint *left, uint *bottom, uint *right ) const
323 Handle masked images and pixmaps correctly. Add code to handle
324 asymmetrical printer margins correctly.
330 QString sessionKey() const
336 QStyleOption( QCheckListItem* i )
337 QCheckListItem* checkListItem() const
340 PE_CheckListController, PE_CheckListIndicator,
341 PE_CheckListExclusiveIndicator, PE_PanelGroupBox
343 CE_DockWindowEmptyArea
344 PM_CheckListButtonSize
345 CT_TabBarTab, CT_Slider, CT_Header, CT_LineEdit
346 SH_GroupBox_TextLabelVerticalAlignment
358 bool load( const uchar *data, int len )
364 QVariant( const QPen& )
365 const QPen toPen() const
375 All top-level widgets will now try to find an appropriate application
376 icon when they're not given one, trying in this order
377 1. Parent widget's icon
378 2. Top-level widget's icon
379 3. Application main widget's icon
382 bool isFullScreen() const
383 void setSizePolicy( QSizePolicy::SizeType hor, QSizePolicy::SizeType ver, bool hfw = FALSE )
391 Two different transformation modes for painter transformations are now
392 available. See the QWMatrix documentation for details.
395 QPointArray mapToPolygon( const QRect &r ) const
397 static void setTransformationMode( QWMatrix::TransformationMode m )
398 static TransformationMode transformationMode()
401 TransformationMode { Points, Areas }
406 While still remaining a subclass of QNetworkProtocol, QFtp can be now
407 used directly for more advanced FTP operations. The QFtp documentation
408 provides details of the extensions to the API.
413 While still remaining a subclass of QNetworkProtocol, QHttp can be now
414 used directly for more advanced HTTP operations. The QHttp
415 documentation provides details of the extensions to the API.
426 Unicode, PreparedQueries, OracleBindingStyle, ODBCBindingStyle
432 bool isForwardOnly() const
433 void setForwardOnly( bool forward )
435 bool prepare( const QString& query )
436 void bindValue( const QString& placeholder, const QVariant& val )
437 void bindValue( int pos, const QVariant& val )
438 void addBindValue( const QVariant& val )
444 QTableSelection( int start_row, int start_col, int end_row, int end_col )
453 void selectCells( int start_row, int start_col, int end_row, int end_col )
454 void selectRow( int row )
455 void selectColumn( int col )
456 void updateHeaderStates()
457 void setRowLabels( const QStringList &labels )
458 void setColumnLabels( const QStringList &labels )
464 QCString &replace( char c, const char *after )
465 QCString &replace( const char *, const char * )
466 QCString &replace( char, char )
468 New global functions:
469 QByteArray qCompress( const uchar* data, int nbytes )
470 QByteArray qUncompress( const uchar* data, int nbytes )
471 QByteArray qCompress( const QByteArray& data )
472 QByteArray qUncompress( const QByteArray& data )
474 Speed optimisations in lots of the old search and replace
481 int weekNumber( int *yearNum = 0 ) const
482 static QDate currentDate( Qt::DateTimeSpec )
488 static QTime currentTime( Qt::DateTimeSpec )
494 static QDateTime currentDateTime( Qt::DateTimeSpec )
500 bool replace( uint i, const type *d )
506 QString errorString()
507 static QString escape( const QString& str )
508 int numCaptures() const
514 QSettings( Format format )
515 void setPath( const QString &domain, const QString &product, Scope = User )
516 void beginGroup( const QString &group )
519 QString group() const
522 Format { Native = 0, Ini }
523 Scope { User, Global }
528 Updated Unicode tables to Unicode-3.2
534 QString &append( const QByteArray & )
535 QString &append( const char * )
536 QString &prepend( const QByteArray & )
537 QString &prepend( const char * )
538 QString &remove( QChar c )
539 QString &remove( char c )
540 QString &remove( const QString & )
541 QString &remove( const QRegExp & )
542 QString &remove( const char * )
543 QString &replace( uint index, uint len, QChar )
544 QString &replace( uint index, uint len, char c )
545 QString &replace( QChar c, const QString & )
546 QString &replace( char c, const QString & after )
547 QString &replace( const QString &, const QString & )
548 QString &replace( QChar, QChar )
549 QString &operator+=( const QByteArray &str )
550 QString &operator+=( const char *str )
551 static QString fromUcs2( const unsigned short *ucs2 )
552 const unsigned short *ucs2() const
555 find(), findRev() and contains() use either a fast hashing
556 algorithm (for short strings) or an optimized Boyer-Moore
557 implementation for long strings. Lots of smaller performance
574 void setDisplay( uint )
577 Display { Hours, Minutes, Seconds, AMPM }
593 void setFlat( bool b )
599 QListBoxItem* selectedItem() const
605 int sortColumn() const
611 void addLine() ( as slot)
612 void subtractLine() (as slot)
618 void sourceChanged( const QString& )
619 void anchorClicked( const QString&, const QString& )
624 QTextEdit offers another TextFormat (LogText), which is optimized
625 (speed and memory) for displaying large read-only texts normally used
632 QString anchorAt( const QPoint& pos, AnchorAttribute a )
633 void setAllowTabs( bool b )
634 bool allowTabs() const
635 void insert( const QString &text, uint insertionFlags = CheckNewLines | RemoveSelected )
638 void clicked( int parag, int index )
639 void doubleClicked( int parag, int index )
642 TextInsertionFlags { RedoIndentation, CheckNewLines, RemoveSelected }
645 AtWordOrDocumentBoundary
651 TextPosition textPosition
654 TextPosition textPosition() const
655 void setTextPosition( TextPosition pos )
658 TextPosition { Right, Under }
664 static void setWakeUpDelay( int )
670 static void setFont( const QFont &font )
676 QString toString( int ) const
677 QCString toCString( int ) const
683 Safe handling of huge font sizes. Added support for the new
684 Xft2 font library on XFree-4.x.
690 Removed the 16 bit size limitation
692 ****************************************************************************