mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2024-11-23 12:07:03 +08:00
693 lines
17 KiB
Plaintext
693 lines
17 KiB
Plaintext
Qt 3.1 introduces many significant new features and many improvements
|
|
over the 3.0.x series. This file provides an overview of the main
|
|
changes since version 3.0.5. For further details see the online
|
|
documentation which is included in this distribution, and also
|
|
available at http://qt.nokia.com/doc/.
|
|
|
|
The Qt version 3.1 series is binary compatible with the 3.0.x series:
|
|
applications compiled for 3.0 will continue to run with 3.1.
|
|
|
|
|
|
****************************************************************************
|
|
* General *
|
|
****************************************************************************
|
|
|
|
Qt Script for Applications
|
|
--------------------------
|
|
Qt 3.1 is the first Qt release that can be used with Qt Script for
|
|
Applications (QSA). QSA provides a scripting engine, an IDE for
|
|
creating and editing scripts and script forms, and bindings to the Qt
|
|
API. Script-enabling a Qt application is not difficult and the IDE
|
|
makes it easy for resellers and end-users to write their own scripts.
|
|
QSA is due for release after Qt 3.1.
|
|
|
|
|
|
Qt Designer
|
|
-----------
|
|
Qt Designer, the visual GUI builder, has undergone several usability
|
|
improvements. A new dialog for creating and editing signals and slots
|
|
connections has been created: it is much easier to use and much faster
|
|
for setting up multiple connections. The widgets are now presented in
|
|
an easy-to-use toolbox rather than in toolbars (although you can still
|
|
have the toolbars if you want). The property editor now handles common
|
|
properties in multiple widgets simultaneously. By popular demand,
|
|
WYSIWYG support for QWidgetStack has been added. Rich text is now
|
|
supported with a rich text editor. And the code editor can be used for
|
|
ordinary member functions as well as for slots.
|
|
|
|
|
|
Qt Assistant
|
|
------------
|
|
Qt Assistant, the Qt documentation browser, can now be used with
|
|
custom documentation sets. This new functionality combined with the
|
|
new QAssistantClient class means that you can use Qt Assistant as a
|
|
help browser for your own applications. Qt Assistant has also been
|
|
enhanced by the addition of a fast full text search engine.
|
|
|
|
|
|
Motif
|
|
-----
|
|
The general industry-wide move away from Motif is leaving more and
|
|
more companies in need of a migration solution. But converting large
|
|
legacy applications in one step is often impractical. To minimize
|
|
risks and to manage the workload companies often want to port code on
|
|
a module by module basis. Qt 3.1 includeds a completely new Motif
|
|
module that supports hybrid applications in which Qt code and Motif
|
|
code coexist. (This obsoletes the earlier rudimentary Qt Xt/Motif
|
|
extension.)
|
|
|
|
|
|
ActiveX
|
|
-------
|
|
With the release of Qt 3.1, customers who use Qt for Microsoft Windows
|
|
development can now use Qt with ActiveX. The new ActiveQt module
|
|
provides a simple API for COM and ActiveX. The module can be used to
|
|
create applications which host ActiveX controls, and also to create
|
|
applications that serve ActiveX controls (e.g. Internet Explorer
|
|
plugins).
|
|
|
|
|
|
Qt/Mac
|
|
------
|
|
The introduction of Qt/Mac, a Mac OS X port of Qt, with Qt 3.0 has
|
|
proved a great success. This port has undergone many improvements in
|
|
Qt 3.1, especially with respect to Appearance Manager, anti-aliased
|
|
text and user settings. The Qt OpenGL support is greatly improved, and
|
|
uses the hardware-accelerated drivers.
|
|
|
|
|
|
Qt/Embedded
|
|
-----------
|
|
Graphics, mouse and keyboard drivers can now be compiled as plugins.
|
|
|
|
|
|
Qt library
|
|
----------
|
|
In addition to the new additions and enhancements referred to above,
|
|
as with all major Qt releases, Qt 3.1 includes hundreds of
|
|
improvements in the existing class library. Here is a brief summary of
|
|
the most significant changes:
|
|
|
|
- QTextEdit has a new text format: LogText. This is a performance and
|
|
memory optimized format especially designed for the fast display of
|
|
large amounts of text. The format supports basic highlighting,
|
|
including bold and colored text.
|
|
|
|
- The new QSyntaxHighlighter class makes it both easy and efficient to
|
|
add syntax highlighting capabilities to a QTextEdit.
|
|
|
|
- QHttp and QFtp in earlier Qt's were implementations of the
|
|
QNetworkProtocol. Both have been extended to stand in their own
|
|
right. If you missed some flexibility in the network protocol
|
|
abstractions of earlier Qt's, the new QHttp and QFtp classes should
|
|
provide the solution.
|
|
|
|
- QAccel, used to handle keyboard shortcuts, now gracefully copes with
|
|
shortcut clashes. If a clash occurs, a new signal,
|
|
activatedAmbiguously(), is emitted. Classes that use QAccel, like
|
|
QButton and QPopupMenu, make use of this new functionality.
|
|
Futhermore QAccel can now handle multi-key sequences, for example,
|
|
Ctrl+X,Ctrl+F.
|
|
|
|
- QClipboard has been extended to simplify data exchange between
|
|
programs.
|
|
|
|
- Thread support: almost all methods in the tools classes have been
|
|
made reentrant. QApplication::postEvent() and a few other methods
|
|
are now thread-safe if Qt is compiled as a multi-threaded library.
|
|
(The documentation now states if a class or function is thread-safe
|
|
or reentrant.)
|
|
|
|
- A QMutexLocker class has been added to simplify the locking and
|
|
unlocking of mutexes.
|
|
|
|
- Input methods: A selectionLength() function has been added to
|
|
QIMEvent. Japanese compositions are now handled correctly. Support
|
|
for AIMM based input methods (those working on non-Asian versions of
|
|
Win95/98/Me) has been added.
|
|
|
|
- Large File support: Qt's internals have been modified to support
|
|
Large Files (> 2GB). QFileDialog will now correctly display and
|
|
select Large Files.
|
|
|
|
- SQL module: Support for prepared query execution and value binding
|
|
has been added. Among other benefits, this makes it possible to
|
|
write large BLOBs (> 2 KB) to Oracle databases, and to write Unicode
|
|
strings to SQL Server databases.
|
|
|
|
|
|
Build process
|
|
-------------
|
|
The build process has been improved:
|
|
|
|
- The configure script does not need QTDIR to be set anymore.
|
|
|
|
|
|
****************************************************************************
|
|
* Library *
|
|
****************************************************************************
|
|
|
|
New classes
|
|
==================
|
|
|
|
- QBackInsertIterator
|
|
- QEventLoop
|
|
- QIconFactory
|
|
- QMutexLocker
|
|
- QSyntaxHighlighter
|
|
|
|
|
|
QAction
|
|
------------------
|
|
New functions:
|
|
void setVisible( bool )
|
|
bool isVisible() const
|
|
|
|
|
|
QCanvas
|
|
------------------
|
|
New functions:
|
|
void invalidate()
|
|
bool isValid() const
|
|
|
|
|
|
QColorDialog
|
|
------------------
|
|
New functions:
|
|
static void setStandardColor( int, QRgb )
|
|
|
|
|
|
QAccel
|
|
------------------
|
|
New signals:
|
|
void activatedAmbiguously( int id )
|
|
|
|
|
|
QApplication
|
|
------------------
|
|
The event loop has been moved to the QEventLoop class, making it
|
|
easier to integrate other toolkits with Qt.
|
|
|
|
New functions:
|
|
QEventLoop *eventLoop() const
|
|
void setEventLoop( QEventLoop * )
|
|
QString sessionKey() const
|
|
|
|
|
|
QClipboard
|
|
------------------
|
|
New functions:
|
|
void clear( Mode mode )
|
|
bool supportsSelection() const
|
|
bool ownsSelection() const
|
|
bool ownsClipboard() const
|
|
QString text( Mode mode ) const
|
|
QString text( QCString& subtype, Mode mode ) const
|
|
void setText( const QString &, Mode mode )
|
|
QMimeSource *data( Mode mode ) const
|
|
void setData( QMimeSource*, Mode mode )
|
|
QImage image( Mode mode ) const
|
|
QPixmap pixmap( Mode mode ) const
|
|
void setImage( const QImage &, Mode mode )
|
|
void setPixmap( const QPixmap &, Mode mode )
|
|
|
|
|
|
QDesktopWidget
|
|
------------------
|
|
New functions:
|
|
const QRect& screenGeometry( QWidget *widget ) const
|
|
const QRect& screenGeometry( const QPoint &point ) const
|
|
const QRect& availableGeometry( int screen ) const
|
|
const QRect& availableGeometry( QWidget *widget ) const
|
|
const QRect& availableGeometry( const QPoint &point ) const
|
|
|
|
|
|
QFileDialog
|
|
------------------
|
|
Large Files (> 2GB) are now correctly displayed and selected.
|
|
|
|
|
|
QFileInfo
|
|
------------------
|
|
QFileInfo now supports Large Files (> 2GB) internally. To maintain
|
|
binary compatibility the QFileInfo API cannot be adapted before Qt 4
|
|
and will truncate file sizes and offsets to 4 GB.
|
|
|
|
New functions:
|
|
bool isHidden() const
|
|
|
|
|
|
QFile
|
|
------------------
|
|
QFile now supports Large Files (> 2GB) internally. To maintain binary
|
|
compatibility the QFile API cannot be adapted before Qt 4 and will
|
|
truncate file sizes and offsets to 4 GB.
|
|
|
|
|
|
QDir
|
|
------------------
|
|
QDir now supports Large Files (> 2GB).
|
|
|
|
|
|
QImEvent
|
|
------------------
|
|
New functions:
|
|
in selectionLength() const
|
|
|
|
|
|
QIconSet
|
|
------------------
|
|
New functions:
|
|
void installIconFactory( QIconFactory *factory )
|
|
|
|
|
|
QImage
|
|
------------------
|
|
New functions:
|
|
static QImage fromMimeSource( const QString& abs_name )
|
|
|
|
|
|
QMetaObject
|
|
------------------
|
|
New functions:
|
|
QStrList enumeratorNames( bool super ) const
|
|
int numEnumerators( bool super ) const
|
|
static bool hasMetaObject( const char *class_name )
|
|
|
|
|
|
QMenuData
|
|
------------------
|
|
New functions:
|
|
bool isItemVisible( int id ) const
|
|
void setItemVisible( int id, bool visible )
|
|
Both functions are inherited by QMenuBar and QPopupMenu
|
|
|
|
|
|
QPaintDevice
|
|
------------------
|
|
New functions (x11 only):
|
|
static Qt::HANDLE x11AppRootWindow()
|
|
static int x11AppDepth( int screen )
|
|
static int x11AppCells( int screen )
|
|
static Qt::HANDLE x11AppRootWindow( int screen )
|
|
static Qt::HANDLE x11AppColormap( int screen )
|
|
static void *x11AppVisual( int screen )
|
|
static bool x11AppDefaultColormap( int screen )
|
|
static bool x11AppDefaultVisual( int screen )
|
|
static int x11AppDpiX( int )
|
|
static int x11AppDpiY( int )
|
|
static void x11SetAppDpiX( int, int )
|
|
static void x11SetAppDpiY( int, int )
|
|
|
|
|
|
QPicture
|
|
------------------
|
|
New functions:
|
|
void setBoundingRect( const QRect &r )
|
|
|
|
|
|
QPixmap
|
|
------------------
|
|
New functions:
|
|
bool hasAlpha() const
|
|
static QPixmap fromMimeSource( const QString& abs_name )
|
|
|
|
|
|
QPrinter
|
|
------------------
|
|
New functions:
|
|
void setMargins( uint top, uint left, uint bottom, uint right )
|
|
void margins( uint *top, uint *left, uint *bottom, uint *right ) const
|
|
|
|
Improvements:
|
|
Handle masked images and pixmaps correctly. Add code to handle
|
|
asymmetrical printer margins correctly.
|
|
|
|
|
|
QSessionManager
|
|
------------------
|
|
New functions:
|
|
QString sessionKey() const
|
|
|
|
|
|
QStyleOption
|
|
------------------
|
|
New functions:
|
|
QStyleOption( QCheckListItem* i )
|
|
QCheckListItem* checkListItem() const
|
|
|
|
New enums values:
|
|
PE_CheckListController, PE_CheckListIndicator,
|
|
PE_CheckListExclusiveIndicator, PE_PanelGroupBox
|
|
CE_MenuBarEmptyArea
|
|
CE_DockWindowEmptyArea
|
|
PM_CheckListButtonSize
|
|
CT_TabBarTab, CT_Slider, CT_Header, CT_LineEdit
|
|
SH_GroupBox_TextLabelVerticalAlignment
|
|
|
|
|
|
QThread
|
|
------------------
|
|
New functions:
|
|
void terminate()
|
|
|
|
|
|
QTranslator
|
|
------------------
|
|
New functions:
|
|
bool load( const uchar *data, int len )
|
|
|
|
|
|
QVariant
|
|
------------------
|
|
New functions:
|
|
QVariant( const QPen& )
|
|
const QPen toPen() const
|
|
QPen& asPen()
|
|
bool isNull() const
|
|
|
|
New enum values:
|
|
KeySequence, Pen
|
|
|
|
|
|
QWidget
|
|
------------------
|
|
All top-level widgets will now try to find an appropriate application
|
|
icon when they're not given one, trying in this order
|
|
1. Parent widget's icon
|
|
2. Top-level widget's icon
|
|
3. Application main widget's icon
|
|
|
|
New functions:
|
|
bool isFullScreen() const
|
|
void setSizePolicy( QSizePolicy::SizeType hor, QSizePolicy::SizeType ver, bool hfw = FALSE )
|
|
|
|
New enum values:
|
|
AncestorOrigin
|
|
|
|
|
|
QWMatrix
|
|
------------------
|
|
Two different transformation modes for painter transformations are now
|
|
available. See the QWMatrix documentation for details.
|
|
|
|
New functions:
|
|
QPointArray mapToPolygon( const QRect &r ) const
|
|
double det() const
|
|
static void setTransformationMode( QWMatrix::TransformationMode m )
|
|
static TransformationMode transformationMode()
|
|
|
|
New enums:
|
|
TransformationMode { Points, Areas }
|
|
|
|
|
|
QFtp
|
|
------------------
|
|
While still remaining a subclass of QNetworkProtocol, QFtp can be now
|
|
used directly for more advanced FTP operations. The QFtp documentation
|
|
provides details of the extensions to the API.
|
|
|
|
|
|
QHttp
|
|
------------------
|
|
While still remaining a subclass of QNetworkProtocol, QHttp can be now
|
|
used directly for more advanced HTTP operations. The QHttp
|
|
documentation provides details of the extensions to the API.
|
|
|
|
Related new classes:
|
|
QHttpHeader
|
|
QHttpResponseHeader
|
|
QHttpRequestHeader
|
|
|
|
|
|
QSqlDriver
|
|
------------------
|
|
New enum values:
|
|
Unicode, PreparedQueries, OracleBindingStyle, ODBCBindingStyle
|
|
|
|
|
|
QSqlQuery
|
|
------------------
|
|
New functions:
|
|
bool isForwardOnly() const
|
|
void setForwardOnly( bool forward )
|
|
bool exec()
|
|
bool prepare( const QString& query )
|
|
void bindValue( const QString& placeholder, const QVariant& val )
|
|
void bindValue( int pos, const QVariant& val )
|
|
void addBindValue( const QVariant& val )
|
|
|
|
|
|
QTableSelection
|
|
------------------
|
|
New functions:
|
|
QTableSelection( int start_row, int start_col, int end_row, int end_col )
|
|
|
|
|
|
QTable
|
|
------------------
|
|
New properties:
|
|
int numSelections
|
|
|
|
New functions:
|
|
void selectCells( int start_row, int start_col, int end_row, int end_col )
|
|
void selectRow( int row )
|
|
void selectColumn( int col )
|
|
void updateHeaderStates()
|
|
void setRowLabels( const QStringList &labels )
|
|
void setColumnLabels( const QStringList &labels )
|
|
|
|
|
|
QCString
|
|
------------------
|
|
New functions:
|
|
QCString &replace( char c, const char *after )
|
|
QCString &replace( const char *, const char * )
|
|
QCString &replace( char, char )
|
|
|
|
New global functions:
|
|
QByteArray qCompress( const uchar* data, int nbytes )
|
|
QByteArray qUncompress( const uchar* data, int nbytes )
|
|
QByteArray qCompress( const QByteArray& data )
|
|
QByteArray qUncompress( const QByteArray& data )
|
|
Improvements:
|
|
Speed optimisations in lots of the old search and replace
|
|
functions.
|
|
|
|
|
|
QDate
|
|
------------------
|
|
New functions:
|
|
int weekNumber( int *yearNum = 0 ) const
|
|
static QDate currentDate( Qt::DateTimeSpec )
|
|
|
|
|
|
QTime
|
|
------------------
|
|
New functions:
|
|
static QTime currentTime( Qt::DateTimeSpec )
|
|
|
|
|
|
QDateTime
|
|
------------------
|
|
New functions:
|
|
static QDateTime currentDateTime( Qt::DateTimeSpec )
|
|
|
|
|
|
QPtrList
|
|
------------------
|
|
New functions:
|
|
bool replace( uint i, const type *d )
|
|
|
|
|
|
QRegExp
|
|
------------------
|
|
New functions:
|
|
QString errorString()
|
|
static QString escape( const QString& str )
|
|
int numCaptures() const
|
|
|
|
|
|
QSettings
|
|
------------------
|
|
New functions:
|
|
QSettings( Format format )
|
|
void setPath( const QString &domain, const QString &product, Scope = User )
|
|
void beginGroup( const QString &group )
|
|
void endGroup()
|
|
void resetGroup()
|
|
QString group() const
|
|
|
|
New enums:
|
|
Format { Native = 0, Ini }
|
|
Scope { User, Global }
|
|
|
|
|
|
QChar
|
|
------------------
|
|
Updated Unicode tables to Unicode-3.2
|
|
|
|
|
|
QString
|
|
------------------
|
|
New functions:
|
|
QString &append( const QByteArray & )
|
|
QString &append( const char * )
|
|
QString &prepend( const QByteArray & )
|
|
QString &prepend( const char * )
|
|
QString &remove( QChar c )
|
|
QString &remove( char c )
|
|
QString &remove( const QString & )
|
|
QString &remove( const QRegExp & )
|
|
QString &remove( const char * )
|
|
QString &replace( uint index, uint len, QChar )
|
|
QString &replace( uint index, uint len, char c )
|
|
QString &replace( QChar c, const QString & )
|
|
QString &replace( char c, const QString & after )
|
|
QString &replace( const QString &, const QString & )
|
|
QString &replace( QChar, QChar )
|
|
QString &operator+=( const QByteArray &str )
|
|
QString &operator+=( const char *str )
|
|
static QString fromUcs2( const unsigned short *ucs2 )
|
|
const unsigned short *ucs2() const
|
|
|
|
Improvements:
|
|
find(), findRev() and contains() use either a fast hashing
|
|
algorithm (for short strings) or an optimized Boyer-Moore
|
|
implementation for long strings. Lots of smaller performance
|
|
optimisations.
|
|
|
|
|
|
QTextStream
|
|
------------------
|
|
New functions:
|
|
QTextCodec *codec()
|
|
|
|
|
|
QTimeEdit
|
|
------------------
|
|
New properties:
|
|
Display display
|
|
|
|
New functions:
|
|
uint display() const
|
|
void setDisplay( uint )
|
|
|
|
New enums:
|
|
Display { Hours, Minutes, Seconds, AMPM }
|
|
|
|
|
|
QFrame
|
|
------------------
|
|
New enum values:
|
|
GroupBoxPanel
|
|
|
|
|
|
QGroupBox
|
|
------------------
|
|
New properties:
|
|
bool flat
|
|
|
|
New functions:
|
|
bool isFlat() const
|
|
void setFlat( bool b )
|
|
|
|
|
|
QListBox
|
|
------------------
|
|
New functions:
|
|
QListBoxItem* selectedItem() const
|
|
|
|
|
|
QListView
|
|
------------------
|
|
New functions:
|
|
int sortColumn() const
|
|
|
|
|
|
QSlider
|
|
------------------
|
|
New functions:
|
|
void addLine() ( as slot)
|
|
void subtractLine() (as slot)
|
|
|
|
|
|
QTextBrowser
|
|
------------------
|
|
New functions:
|
|
void sourceChanged( const QString& )
|
|
void anchorClicked( const QString&, const QString& )
|
|
|
|
|
|
QTextEdit
|
|
------------------
|
|
QTextEdit offers another TextFormat (LogText), which is optimized
|
|
(speed and memory) for displaying large read-only texts normally used
|
|
for logging.
|
|
|
|
New properties:
|
|
bool allowTabs
|
|
|
|
New functions:
|
|
QString anchorAt( const QPoint& pos, AnchorAttribute a )
|
|
void setAllowTabs( bool b )
|
|
bool allowTabs() const
|
|
void insert( const QString &text, uint insertionFlags = CheckNewLines | RemoveSelected )
|
|
|
|
New signals:
|
|
void clicked( int parag, int index )
|
|
void doubleClicked( int parag, int index )
|
|
|
|
New enums:
|
|
TextInsertionFlags { RedoIndentation, CheckNewLines, RemoveSelected }
|
|
|
|
New enum values:
|
|
AtWordOrDocumentBoundary
|
|
|
|
|
|
QToolButton
|
|
------------------
|
|
New properties:
|
|
TextPosition textPosition
|
|
|
|
New functions:
|
|
TextPosition textPosition() const
|
|
void setTextPosition( TextPosition pos )
|
|
|
|
New enums:
|
|
TextPosition { Right, Under }
|
|
|
|
|
|
QTooltip
|
|
------------------
|
|
New functions:
|
|
static void setWakeUpDelay( int )
|
|
|
|
|
|
QWhatsThis
|
|
------------------
|
|
New functions:
|
|
static void setFont( const QFont &font )
|
|
|
|
|
|
QDomDocument
|
|
------------------
|
|
New functions:
|
|
QString toString( int ) const
|
|
QCString toCString( int ) const
|
|
|
|
|
|
QFont on X11
|
|
------------------
|
|
Improvements:
|
|
Safe handling of huge font sizes. Added support for the new
|
|
Xft2 font library on XFree-4.x.
|
|
|
|
|
|
QRegion on X11
|
|
------------------
|
|
Improvements:
|
|
Removed the 16 bit size limitation
|
|
|
|
****************************************************************************
|