1Qt 3.1 introduces many significant new features and many improvements 2over the 3.0.x series. This file provides an overview of the main 3changes since version 3.0.5. For further details see the online 4documentation which is included in this distribution, and also 5available at http://qt.nokia.com/doc/. 6 7The Qt version 3.1 series is binary compatible with the 3.0.x series: 8applications compiled for 3.0 will continue to run with 3.1. 9 10 11**************************************************************************** 12* General * 13**************************************************************************** 14 15Qt Script for Applications 16-------------------------- 17Qt 3.1 is the first Qt release that can be used with Qt Script for 18Applications (QSA). QSA provides a scripting engine, an IDE for 19creating and editing scripts and script forms, and bindings to the Qt 20API. Script-enabling a Qt application is not difficult and the IDE 21makes it easy for resellers and end-users to write their own scripts. 22QSA is due for release after Qt 3.1. 23 24 25Qt Designer 26----------- 27Qt Designer, the visual GUI builder, has undergone several usability 28improvements. A new dialog for creating and editing signals and slots 29connections has been created: it is much easier to use and much faster 30for setting up multiple connections. The widgets are now presented in 31an easy-to-use toolbox rather than in toolbars (although you can still 32have the toolbars if you want). The property editor now handles common 33properties in multiple widgets simultaneously. By popular demand, 34WYSIWYG support for QWidgetStack has been added. Rich text is now 35supported with a rich text editor. And the code editor can be used for 36ordinary member functions as well as for slots. 37 38 39Qt Assistant 40------------ 41Qt Assistant, the Qt documentation browser, can now be used with 42custom documentation sets. This new functionality combined with the 43new QAssistantClient class means that you can use Qt Assistant as a 44help browser for your own applications. Qt Assistant has also been 45enhanced by the addition of a fast full text search engine. 46 47 48Motif 49----- 50The general industry-wide move away from Motif is leaving more and 51more companies in need of a migration solution. But converting large 52legacy applications in one step is often impractical. To minimize 53risks and to manage the workload companies often want to port code on 54a module by module basis. Qt 3.1 includeds a completely new Motif 55module that supports hybrid applications in which Qt code and Motif 56code coexist. (This obsoletes the earlier rudimentary Qt Xt/Motif 57extension.) 58 59 60ActiveX 61------- 62With the release of Qt 3.1, customers who use Qt for Microsoft Windows 63development can now use Qt with ActiveX. The new ActiveQt module 64provides a simple API for COM and ActiveX. The module can be used to 65create applications which host ActiveX controls, and also to create 66applications that serve ActiveX controls (e.g. Internet Explorer 67plugins). 68 69 70Qt/Mac 71------ 72The introduction of Qt/Mac, a Mac OS X port of Qt, with Qt 3.0 has 73proved a great success. This port has undergone many improvements in 74Qt 3.1, especially with respect to Appearance Manager, anti-aliased 75text and user settings. The Qt OpenGL support is greatly improved, and 76uses the hardware-accelerated drivers. 77 78 79Qt/Embedded 80----------- 81Graphics, mouse and keyboard drivers can now be compiled as plugins. 82 83 84Qt library 85---------- 86In addition to the new additions and enhancements referred to above, 87as with all major Qt releases, Qt 3.1 includes hundreds of 88improvements in the existing class library. Here is a brief summary of 89the most significant changes: 90 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. 95 96- The new QSyntaxHighlighter class makes it both easy and efficient to 97 add syntax highlighting capabilities to a QTextEdit. 98 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. 104 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, 110 Ctrl+X,Ctrl+F. 111 112- QClipboard has been extended to simplify data exchange between 113 programs. 114 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 119 or reentrant.) 120 121- A QMutexLocker class has been added to simplify the locking and 122 unlocking of mutexes. 123 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. 128 129- Large File support: Qt's internals have been modified to support 130 Large Files (> 2GB). QFileDialog will now correctly display and 131 select Large Files. 132 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. 137 138 139Build process 140------------- 141The build process has been improved: 142 143- The configure script does not need QTDIR to be set anymore. 144 145 146**************************************************************************** 147* Library * 148**************************************************************************** 149 150New classes 151================== 152 153- QBackInsertIterator 154- QEventLoop 155- QIconFactory 156- QMutexLocker 157- QSyntaxHighlighter 158 159 160QAction 161------------------ 162New functions: 163 void setVisible( bool ) 164 bool isVisible() const 165 166 167QCanvas 168------------------ 169New functions: 170 void invalidate() 171 bool isValid() const 172 173 174QColorDialog 175------------------ 176New functions: 177 static void setStandardColor( int, QRgb ) 178 179 180QAccel 181------------------ 182New signals: 183 void activatedAmbiguously( int id ) 184 185 186QApplication 187------------------ 188The event loop has been moved to the QEventLoop class, making it 189easier to integrate other toolkits with Qt. 190 191New functions: 192 QEventLoop *eventLoop() const 193 void setEventLoop( QEventLoop * ) 194 QString sessionKey() const 195 196 197QClipboard 198------------------ 199New functions: 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 ) 213 214 215QDesktopWidget 216------------------ 217New functions: 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 223 224 225QFileDialog 226------------------ 227Large Files (> 2GB) are now correctly displayed and selected. 228 229 230QFileInfo 231------------------ 232QFileInfo now supports Large Files (> 2GB) internally. To maintain 233binary compatibility the QFileInfo API cannot be adapted before Qt 4 234and will truncate file sizes and offsets to 4 GB. 235 236New functions: 237 bool isHidden() const 238 239 240QFile 241------------------ 242QFile now supports Large Files (> 2GB) internally. To maintain binary 243compatibility the QFile API cannot be adapted before Qt 4 and will 244truncate file sizes and offsets to 4 GB. 245 246 247QDir 248------------------ 249QDir now supports Large Files (> 2GB). 250 251 252QImEvent 253------------------ 254New functions: 255 in selectionLength() const 256 257 258QIconSet 259------------------ 260New functions: 261 void installIconFactory( QIconFactory *factory ) 262 263 264QImage 265------------------ 266New functions: 267 static QImage fromMimeSource( const QString& abs_name ) 268 269 270QMetaObject 271------------------ 272New functions: 273 QStrList enumeratorNames( bool super ) const 274 int numEnumerators( bool super ) const 275 static bool hasMetaObject( const char *class_name ) 276 277 278QMenuData 279------------------ 280New functions: 281 bool isItemVisible( int id ) const 282 void setItemVisible( int id, bool visible ) 283Both functions are inherited by QMenuBar and QPopupMenu 284 285 286QPaintDevice 287------------------ 288New 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 ) 301 302 303QPicture 304------------------ 305New functions: 306 void setBoundingRect( const QRect &r ) 307 308 309QPixmap 310------------------ 311New functions: 312 bool hasAlpha() const 313 static QPixmap fromMimeSource( const QString& abs_name ) 314 315 316QPrinter 317------------------ 318New functions: 319 void setMargins( uint top, uint left, uint bottom, uint right ) 320 void margins( uint *top, uint *left, uint *bottom, uint *right ) const 321 322Improvements: 323 Handle masked images and pixmaps correctly. Add code to handle 324 asymmetrical printer margins correctly. 325 326 327QSessionManager 328------------------ 329New functions: 330 QString sessionKey() const 331 332 333QStyleOption 334------------------ 335New functions: 336 QStyleOption( QCheckListItem* i ) 337 QCheckListItem* checkListItem() const 338 339New enums values: 340 PE_CheckListController, PE_CheckListIndicator, 341 PE_CheckListExclusiveIndicator, PE_PanelGroupBox 342 CE_MenuBarEmptyArea 343 CE_DockWindowEmptyArea 344 PM_CheckListButtonSize 345 CT_TabBarTab, CT_Slider, CT_Header, CT_LineEdit 346 SH_GroupBox_TextLabelVerticalAlignment 347 348 349QThread 350------------------ 351New functions: 352 void terminate() 353 354 355QTranslator 356------------------ 357New functions: 358 bool load( const uchar *data, int len ) 359 360 361QVariant 362------------------ 363New functions: 364 QVariant( const QPen& ) 365 const QPen toPen() const 366 QPen& asPen() 367 bool isNull() const 368 369New enum values: 370 KeySequence, Pen 371 372 373QWidget 374------------------ 375All top-level widgets will now try to find an appropriate application 376icon 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 380 381New functions: 382 bool isFullScreen() const 383 void setSizePolicy( QSizePolicy::SizeType hor, QSizePolicy::SizeType ver, bool hfw = FALSE ) 384 385New enum values: 386 AncestorOrigin 387 388 389QWMatrix 390------------------ 391Two different transformation modes for painter transformations are now 392available. See the QWMatrix documentation for details. 393 394New functions: 395 QPointArray mapToPolygon( const QRect &r ) const 396 double det() const 397 static void setTransformationMode( QWMatrix::TransformationMode m ) 398 static TransformationMode transformationMode() 399 400New enums: 401 TransformationMode { Points, Areas } 402 403 404QFtp 405------------------ 406While still remaining a subclass of QNetworkProtocol, QFtp can be now 407used directly for more advanced FTP operations. The QFtp documentation 408provides details of the extensions to the API. 409 410 411QHttp 412------------------ 413While still remaining a subclass of QNetworkProtocol, QHttp can be now 414used directly for more advanced HTTP operations. The QHttp 415documentation provides details of the extensions to the API. 416 417Related new classes: 418 QHttpHeader 419 QHttpResponseHeader 420 QHttpRequestHeader 421 422 423QSqlDriver 424------------------ 425New enum values: 426 Unicode, PreparedQueries, OracleBindingStyle, ODBCBindingStyle 427 428 429QSqlQuery 430------------------ 431New functions: 432 bool isForwardOnly() const 433 void setForwardOnly( bool forward ) 434 bool exec() 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 ) 439 440 441QTableSelection 442------------------ 443New functions: 444 QTableSelection( int start_row, int start_col, int end_row, int end_col ) 445 446 447QTable 448------------------ 449New properties: 450 int numSelections 451 452New functions: 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 ) 459 460 461QCString 462------------------ 463New functions: 464 QCString &replace( char c, const char *after ) 465 QCString &replace( const char *, const char * ) 466 QCString &replace( char, char ) 467 468New 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 ) 473Improvements: 474 Speed optimisations in lots of the old search and replace 475 functions. 476 477 478QDate 479------------------ 480New functions: 481 int weekNumber( int *yearNum = 0 ) const 482 static QDate currentDate( Qt::DateTimeSpec ) 483 484 485QTime 486------------------ 487New functions: 488 static QTime currentTime( Qt::DateTimeSpec ) 489 490 491QDateTime 492------------------ 493New functions: 494 static QDateTime currentDateTime( Qt::DateTimeSpec ) 495 496 497QPtrList 498------------------ 499New functions: 500 bool replace( uint i, const type *d ) 501 502 503QRegExp 504------------------ 505New functions: 506 QString errorString() 507 static QString escape( const QString& str ) 508 int numCaptures() const 509 510 511QSettings 512------------------ 513New functions: 514 QSettings( Format format ) 515 void setPath( const QString &domain, const QString &product, Scope = User ) 516 void beginGroup( const QString &group ) 517 void endGroup() 518 void resetGroup() 519 QString group() const 520 521New enums: 522 Format { Native = 0, Ini } 523 Scope { User, Global } 524 525 526QChar 527------------------ 528Updated Unicode tables to Unicode-3.2 529 530 531QString 532------------------ 533New functions: 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 553 554Improvements: 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 558 optimisations. 559 560 561QTextStream 562------------------ 563New functions: 564 QTextCodec *codec() 565 566 567QTimeEdit 568------------------ 569New properties: 570 Display display 571 572New functions: 573 uint display() const 574 void setDisplay( uint ) 575 576New enums: 577 Display { Hours, Minutes, Seconds, AMPM } 578 579 580QFrame 581------------------ 582New enum values: 583 GroupBoxPanel 584 585 586QGroupBox 587------------------ 588New properties: 589 bool flat 590 591New functions: 592 bool isFlat() const 593 void setFlat( bool b ) 594 595 596QListBox 597------------------ 598New functions: 599 QListBoxItem* selectedItem() const 600 601 602QListView 603------------------ 604New functions: 605 int sortColumn() const 606 607 608QSlider 609------------------ 610New functions: 611 void addLine() ( as slot) 612 void subtractLine() (as slot) 613 614 615QTextBrowser 616------------------ 617New functions: 618 void sourceChanged( const QString& ) 619 void anchorClicked( const QString&, const QString& ) 620 621 622QTextEdit 623------------------ 624QTextEdit offers another TextFormat (LogText), which is optimized 625(speed and memory) for displaying large read-only texts normally used 626for logging. 627 628New properties: 629 bool allowTabs 630 631New functions: 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 ) 636 637New signals: 638 void clicked( int parag, int index ) 639 void doubleClicked( int parag, int index ) 640 641New enums: 642 TextInsertionFlags { RedoIndentation, CheckNewLines, RemoveSelected } 643 644New enum values: 645 AtWordOrDocumentBoundary 646 647 648QToolButton 649------------------ 650New properties: 651 TextPosition textPosition 652 653New functions: 654 TextPosition textPosition() const 655 void setTextPosition( TextPosition pos ) 656 657New enums: 658 TextPosition { Right, Under } 659 660 661QTooltip 662------------------ 663New functions: 664 static void setWakeUpDelay( int ) 665 666 667QWhatsThis 668------------------ 669New functions: 670 static void setFont( const QFont &font ) 671 672 673QDomDocument 674------------------ 675New functions: 676 QString toString( int ) const 677 QCString toCString( int ) const 678 679 680QFont on X11 681------------------ 682Improvements: 683 Safe handling of huge font sizes. Added support for the new 684 Xft2 font library on XFree-4.x. 685 686 687QRegion on X11 688------------------ 689Improvements: 690 Removed the 16 bit size limitation 691 692**************************************************************************** 693