You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pytqt/doc/qtdocs.sip

1921 lines
50 KiB

// This is the SIP file for organising the PyQt documentation.
//
// Copyright (c) 2007
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
//
// This file is part of PyQt.
//
// This copy of PyQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
//
// PyQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// PyQt; see the file LICENSE. If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%Module Dummy
%Include qt/versions.sip
%Doc
<!DOCTYPE Article PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
<Article>
<ArtHeader>
<Title>Python Bindings for Qt (3.18.1)</Title>
<Author>
<FirstName>Phil</FirstName>
<Surname>Thompson</Surname>
</Author>
<Abstract>
<Para>
This document describes a set of Python bindings for the Qt widget set.
Contact the author at <Email>phil@riverbankcomputing.co.uk</Email>.
</Para>
</Abstract>
</ArtHeader>
<Sect1><Title>Introduction</Title>
<Para>
PyQt is a set of Python bindings for the Qt toolkit and available for all
platforms supported by Qt, including Windows, Linux, UNIX, MacOS/X and embedded
systems such as the Sharp Zaurus and the Compaq iPAQ. They have been tested
against Qt versions 1.43 to 3.3.6, Qt Non-commercial, Qtopia 1.5.0, and Python
versions 1.5 to 2.4.2. Qt/Embedded v3 is not supported. Qt v4 is supported
by PyQt v4.
</Para>
<Para>
PyQt is available under the GPL license for use with the GPL version of Qt, a
a commercial license for use with the commercial version of Qt, a
non-commercial license for use with the non-commercial version of Qt v2, and an
educational license for use with the educational version of Qt.
</Para>
<Para>
There is also an evaluation version of PyQt for Windows. This must be used
with the corresponding evaluation version of Qt.
</Para>
<Para>
PyQt is built using SIP (a tool for generating Python extension modules for
C++ class libraries). SIP v4.6 or later must be installed in order to build
and run this version of PyQt.
</Para>
<Para>
PyQt for MacOS/X requires Qt v3.1.0 or later and Python v2.3 or later.
</Para>
<Para>
The bindings are implemented as a number of Python modules
</Para>
<ItemizedList>
<ListItem>
<Para>
<Literal>qt</Literal> is the main module and contains the core classes and most
user interface widgets.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>qtaxcontainer</Literal> contains a sub-set of the classes implemented
in Qt's QAxContainer module, part of Qt's ActiveQt framework.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>qtcanvas</Literal> contains the classes implemented in Qt's Canvas
module.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>qtgl</Literal> contains the classes implemented in Qt's OpenGL module.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>qtnetwork</Literal> contains the classes implemented in Qt's Network
module.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>qtpe</Literal> contains the classes implemented in Qtopia (originally
called the Qt Palmtop Environment). It is only supported with Qt/Embedded.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>qtsql</Literal> contains the classes implemented in Qt's SQL module.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>qttable</Literal> contains the classes implemented in Qt's Table
module.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>qtui</Literal> contains the classes implemented in Qt's qui library.
These allow GUIs to be created directly from Qt Designer's
<Literal>.ui</Literal> files.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>qtxml</Literal> contains the classes implemented in Qt's XML module.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>qtext</Literal> contains useful third-party classes that are not part
of Qt. At the moment it contains bindings for QScintilla, the port to Qt of
the Scintilla programmer's editor class.
</Para>
</ListItem>
</ItemizedList>
<Para>
PyQt also includes the <Literal>pyuic</Literal> and
<Literal>pylupdate</Literal> utilities which correspond to the Qt
<Literal>uic</Literal> and <Literal>lupdate</Literal> utilities.
<Literal>pyuic</Literal> converts the GUI designs created with Qt Designer to
executable Python code. <Literal>pylupdate</Literal> scans Python code,
extracts all strings that are candidates for internationalisation, and creates
an XML file for use by Qt Linguist.
</Para>
<Sect2><Title>Changes</Title>
<Para>
The changes visible to the Python programmer in this release are as follows.
</Para>
<ItemizedList>
<ListItem>
<Para>
This version requires SIP v4.4 (or later).
</Para>
</ListItem>
<ListItem>
<Para>
Concatenating Python strings and <Literal>QString</Literal>s is now supported.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>QString</Literal> now supports the <Literal>*</Literal> and
<Literal>*=</Literal> operators that behave as they do for Python strings.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>QString</Literal> is more interoperable with Python string and unicode
objects. For example they can be passed as arguments to
<Literal>open()</Literal> and to most (but not all) string methods.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>QPopupMenu</Literal> (and sub-classes) instances now transfer
ownership of the menu to Python in the call to <Literal>exec_loop()</Literal>.
This means the menu's resources are all released when the Python wrapper is
garbage collected without needing to call
<Literal>QObject.deleteLater()</Literal>.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>QObject.sender()</Literal> now handles Python signals.
</Para>
</ListItem>
<ListItem>
<Para>
The missing <Literal>MacintoshVersion</Literal> enum has been added.
</Para>
</ListItem>
<ListItem>
<Para>
<Literal>PYQT_BUILD</Literal> has been removed.
</Para>
</ListItem>
<ListItem>
<Para>
The convention for converting between a C/C++ null pointer and Python's
<Literal>None</Literal> object has now been universally applied. In previous
versions a null pointer to, for example, a Qt list container would often be
converted to an empty list rather than <Literal>None</Literal>.
</Para>
</ListItem>
</ItemizedList>
</Sect2>
</Sect1>
<Sect1><Title>Other PyQt Goodies</Title>
<Sect2><Title>Using Qt Designer</Title>
<Para>
Qt Designer is a GPL'ed GUI design editor provided by Trolltech as part of Qt.
It generates an XML description of a GUI design. Qt includes
<Literal>uic</Literal> which generates C++ code from that XML.
</Para>
<Para>
PyQt includes <Literal>pyuic</Literal> which generates Python code from the
same XML. The Python code is self contained and can be executed immediately.
</Para>
<Para>
It is sometimes useful to be able to include some specific Python code in the
output generated by <Literal>pyuic</Literal>. For example, if you are using
custom widgets, <Literal>pyuic</Literal> has no way of knowing the name of the
Python module containing the widget and so cannot generate the required
<Literal>import</Literal> statement. To help get around this,
<Literal>pyuic</Literal> will extract any lines entered in the
<Literal>Comment</Literal> field of Qt Designer's
<Literal>Form Settings</Literal> dialog that begin with
<Literal>Python:</Literal> and copies them to the generated output.
</Para>
<Para>
Here's a simple example showing the contents of the <Literal>Comment</Literal>
field.
</Para>
<ProgramListing>
This comment will be ignored by pyuic.
Python:
Python:# Import our custom widget.
Python:from foo import bar
</ProgramListing>
<Para>
Here's the corresponding output from <Literal>pyuic</Literal>.
</Para>
<ProgramListing>
from qt import *
# Import our custom widget.
from foo import bar
</ProgramListing>
<Para>
Thanks to Christian Bird, <Literal>pyuic</Literal> will extract Python code
entered using Qt Designer to implement slots. In Qt Designer, when you need to
edit a slot and the source editor appears, enter Python code between the curly
braces. Don't worry about the correct starting indent level, each line is
prepended with a correct indentation.
</Para>
<Para>
Make sure that the <Literal>ui.h</Literal> file is in the same directory as the
<Literal>.ui</Literal> file when using <Literal>pyuic</Literal>. The
<Literal>.ui</Literal> file implies the name of the <Literal>.ui.h</Literal>
file so there is no need to specify it on the command line.
</Para>
<Para>
Here's an example of a simple slot.
</Para>
<ProgramListing>
void DebMainWindowFrm::browsePushButtonClicked()
{
if self.debugging:
QMessageBox.critical(self, "Event", "browse pushbutton was clicked!")
}
</ProgramListing>
<Para>
Here is the resulting code when <Literal>pyuic</Literal> is run.
</Para>
<ProgramListing>
class DebMainWindowFrm(QMainWindow):
...stuff...
def browsePushButtonClicked(self):
if self.debugging:
QMessageBox.critical(self, "Event", "browse pushbutton was clicked!")
</ProgramListing>
<Para>
Note that indenting is as normal and that <Literal>self</Literal> and all other
parameters passed to the slot are available.
</Para>
<Para>
If you use this, you will need to turn off all of the fancy options for the C++
editor in Designer as it tries to force C++ syntax and that's naturally
annoying when trying to code in Python.
</Para>
</Sect2>
<Sect2><Title>Using Qt Linguist</Title>
<Para>
Qt includes the <Literal>lupdate</Literal> program which parses C++ source
files converting calls to the <Literal>QT_TR_NOOP()</Literal> and
<Literal>QT_TRANSLATE_NOOP()</Literal> macros to <Literal>.ts</Literal>
language source files. The <Literal>lrelease</Literal> program is then used to
generate <Literal>.qm</Literal> binary language files that are distributed with
your application.
</Para>
<Para>
Thanks to Detlev Offenbach, PyQt includes the <Literal>pylupdate</Literal>
program. This generates the same <Literal>.ts</Literal> language source files
from your PyQt source files.
</Para>
</Sect2>
</Sect1>
<Sect1><Title>Deploying Commercial PyQt Applications</Title>
<Para>
When deploying commercial PyQt applications it is necessary to discourage users
from accessing the underlying PyQt modules for themselves. A user that used
the modules shipped with your application to develop new applications would
themselves be considered a developer and would need their own commercial Qt and
PyQt licenses.
</Para>
<Para>
One solution to this problem is the
<ULink url="http://www.riverbankcomputing.co.uk/vendorid/">VendorID</ULink>
package. This allows you to build Python extension modules that can only be
imported by a digitally signed custom interpreter. The package enables you to
create such an interpreter with your application embedded within it. The
result is an interpreter that can only run your application, and PyQt modules
that can only be imported by that interpreter. You can use the package to
similarly restrict access to any extension module.
</Para>
<Para>
In order to build PyQt with support for the VendorID package, pass the
<Literal>-i</Literal> command line flag to <Literal>configure.py</Literal>.
</Para>
</Sect1>
<Sect1><Title><Literal>pyqtconfig</Literal> and Build System Support</Title>
<Para>
The SIP build system (ie. the <Literal>sipconfig</Literal> module) is described
in the SIP documentation. PyQt includes the <Literal>pyqtconfig</Literal>
module that can be used by configuration scripts of other bindings that are
built on top of PyQt.
</Para>
<Para>
The <Literal>pyqtconfig</Literal> module contains the following classes:
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>Configuration(sipconfig.Configuration)</Literal></Term>
<ListItem>
<Para>
This class encapsulates additional configuration values, specific to PyQt, that
can be accessed as instance variables.
</Para>
<Para>
The following configuration values are provided (in addition to those provided
by the <Literal>sipconfig.Configuration</Literal> class):
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>pyqt_bin_dir</Literal></Term>
<ListItem>
<Para>
The name of the directory containing the <Literal>pyuic</Literal> and
<Literal>pylupdate</Literal> executables.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_config_args</Literal></Term>
<ListItem>
<Para>
The command line passed to <Literal>configure.py</Literal> when PyQt was
configured.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_mod_dir</Literal></Term>
<ListItem>
<Para>
The name of the directory containing the PyQt modules.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_modules</Literal></Term>
<ListItem>
<Para>
A string containing the names of the PyQt modules that were installed.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_qt_sip_flags</Literal></Term>
<ListItem>
<Para>
A string of the SIP flags used to generate the code for the
<Literal>qt</Literal> module and which should be added to those needed by any
module that imports the <Literal>qt</Literal> module.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_qtaxcontainer_sip_flags</Literal></Term>
<ListItem>
<Para>
A string of the SIP flags used to generate the code for the
<Literal>qtaxcontainer</Literal> module and which should be added to those
needed by any module that imports the <Literal>qtaxcontainer</Literal> module.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_qtcanvas_sip_flags</Literal></Term>
<ListItem>
<Para>
A string of the SIP flags used to generate the code for the
<Literal>qtcanvas</Literal> module and which should be added to those needed by
any module that imports the <Literal>qtcanvas</Literal> module.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_qtext_sip_flags</Literal></Term>
<ListItem>
<Para>
A string of the SIP flags used to generate the code for the
<Literal>qtext</Literal> module and which should be added to those needed by
any module that imports the <Literal>qtext</Literal> module.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_qtgl_sip_flags</Literal></Term>
<ListItem>
<Para>
A string of the SIP flags used to generate the code for the
<Literal>qtgl</Literal> module and which should be added to those needed by any
module that imports the <Literal>qtgl</Literal> module.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_qtnetwork_sip_flags</Literal></Term>
<ListItem>
<Para>
A string of the SIP flags used to generate the code for the
<Literal>qtnetwork</Literal> module and which should be added to those needed
by any module that imports the <Literal>qtnetwork</Literal> module.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_qtsql_sip_flags</Literal></Term>
<ListItem>
<Para>
A string of the SIP flags used to generate the code for the
<Literal>qtsql</Literal> module and which should be added to those needed by
any module that imports the <Literal>qtsql</Literal> module.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_qttable_sip_flags</Literal></Term>
<ListItem>
<Para>
A string of the SIP flags used to generate the code for the
<Literal>qttable</Literal> module and which should be added to those needed by
any module that imports the <Literal>qttable</Literal> module.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_qtui_sip_flags</Literal></Term>
<ListItem>
<Para>
A string of the SIP flags used to generate the code for the
<Literal>qtui</Literal> module and which should be added to those needed by any
module that imports the <Literal>qtui</Literal> module.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_qtxml_sip_flags</Literal></Term>
<ListItem>
<Para>
A string of the SIP flags used to generate the code for the
<Literal>qtxml</Literal> module and which should be added to those needed by
any module that imports the <Literal>qtxml</Literal> module.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_sip_dir</Literal></Term>
<ListItem>
<Para>
The name of the base directory where the <Literal>.sip</Literal> files for each
of the PyQt modules is installed. A sub-directory exists with the same name as
the module.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_version</Literal></Term>
<ListItem>
<Para>
The PyQt version as a 3 part hexadecimal number (eg. v3.10 is represented as
<Literal>0x030a00</Literal>).
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>pyqt_version_str</Literal></Term>
<ListItem>
<Para>
The PyQt version as a string. For development snapshots it will start with
<Literal>snapshot-</Literal>.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>QtModuleMakefile(sipconfig.SIPModuleMakefile)</Literal></Term>
<ListItem>
<Para>
The Makefile class for modules that import the <Literal>qt</Literal> module.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>finalise(self)</Literal></Term>
<ListItem>
<Para>
This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>QtAxContainerModuleMakefile(QtModuleMakefile)</Literal></Term>
<ListItem>
<Para>
The Makefile class for modules that import the <Literal>qtaxcontainer</Literal>
module.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>finalise(self)</Literal></Term>
<ListItem>
<Para>
This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>QtCanvasModuleMakefile(QtModuleMakefile)</Literal></Term>
<ListItem>
<Para>
The Makefile class for modules that import the <Literal>qtcanvas</Literal>
module.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>finalise(self)</Literal></Term>
<ListItem>
<Para>
This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>QtExtModuleMakefile(QtModuleMakefile)</Literal></Term>
<ListItem>
<Para>
The Makefile class for modules that import the <Literal>qtext</Literal> module.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>finalise(self)</Literal></Term>
<ListItem>
<Para>
This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>QtGLModuleMakefile(QtModuleMakefile)</Literal></Term>
<ListItem>
<Para>
The Makefile class for modules that import the <Literal>qtgl</Literal> module.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>finalise(self)</Literal></Term>
<ListItem>
<Para>
This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>QtNetworkModuleMakefile(QtModuleMakefile)</Literal></Term>
<ListItem>
<Para>
The Makefile class for modules that import the <Literal>qtnetwork</Literal>
module.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>finalise(self)</Literal></Term>
<ListItem>
<Para>
This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>QtTableModuleMakefile(QtModuleMakefile)</Literal></Term>
<ListItem>
<Para>
The Makefile class for modules that import the <Literal>qttable</Literal>
module.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>finalise(self)</Literal></Term>
<ListItem>
<Para>
This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>QtSQLModuleMakefile(QtTableModuleMakefile)</Literal></Term>
<ListItem>
<Para>
The Makefile class for modules that import the <Literal>qtsql</Literal> module.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>finalise(self)</Literal></Term>
<ListItem>
<Para>
This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>QtUIModuleMakefile(QtModuleMakefile)</Literal></Term>
<ListItem>
<Para>
The Makefile class for modules that import the <Literal>qtui</Literal> module.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>finalise(self)</Literal></Term>
<ListItem>
<Para>
This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Literal>QtXMLModuleMakefile(QtModuleMakefile)</Literal></Term>
<ListItem>
<Para>
The Makefile class for modules that import the <Literal>qtxml</Literal> module.
</Para>
<VariableList>
<VarListEntry>
<Term><Literal>finalise(self)</Literal></Term>
<ListItem>
<Para>
This is a reimplementation of <Literal>sipconfig.Makefile.finalise()</Literal>.
</Para>
<Para></Para><Para></Para>
</ListItem>
</VarListEntry>
</VariableList>
</ListItem>
</VarListEntry>
</VariableList>
</Sect1>
%End
%ExportedDoc
<Sect1><Title>Things to be Aware Of</Title>
<Sect2><Title>super and Wrapped Classes</Title>
<Para>
Internally PyQt implements a lazy technique for attribute lookup where
attributes are only placed in type and instance dictionaries when they are
first referenced. This technique is needed to reduce the time taken to import
large modules such as PyQt.
</Para>
<Para>
In most circumstances this technique is transparent to an application. The
exception is when <Literal>super</Literal> is used with a PyQt class. The way
that <Literal>super</Literal> is currently implemented means that the lazy
lookup is bypassed resulting in <Literal>AttributeError</Literal> exceptions
unless the attribute has been previously referenced.
</Para>
<Para>
Note that this restriction applies to any class wrapped by SIP and not just
PyQt.
</Para>
</Sect2>
<Sect2><Title>Python Strings, Qt Strings and Unicode</Title>
<Para>
Unicode support was added to Qt in v2.0 and to Python in v1.6. In Qt, Unicode
support is implemented using the <Literal>QString</Literal> class. It is
important to understand that <Literal>QString</Literal>s, Python string objects
and Python Unicode objects are all different but conversions between them are
automatic in almost all cases and easy to achieve manually when needed.
</Para>
<Para>
Whenever PyQt expects a <Literal>QString</Literal> as a function argument, a
Python string object or a Python Unicode object can be provided instead, and
PyQt will do the necessary conversion automatically.
</Para>
<Para>
You may also manually convert Python string and Unicode objects to
<Literal>QString</Literal>s by using the <Literal>QString</Literal> constructor
as demonstrated in the following code fragment.
</Para>
<ProgramListing>
qs1 = QString('Converted Python string object')
qs2 = QString(u'Converted Python Unicode object')
</ProgramListing>
<Para>
In order to convert a <Literal>QString</Literal> to a Python string object use
the Python <Literal>str()</Literal> function. Applying
<Literal>str()</Literal> to a null <Literal>QString</Literal> and an empty
<Literal>QString</Literal> both result in an empty Python string object.
</Para>
<Para>
In order to convert a <Literal>QString</Literal> to a Python Unicode object use
the Python <Literal>unicode()</Literal> function. Applying
<Literal>unicode()</Literal> to a null <Literal>QString</Literal> and an empty
<Literal>QString</Literal> both result in an empty Python Unicode object.
</Para>
</Sect2>
<Sect2><Title>Access to Protected Member Functions</Title>
<Para>
When an instance of a C++ class is not created from Python it is not possible
to access the protected member functions, or emit the signals, of that
instance. Attempts to do so will raise a Python exception. Also, any Python
methods corresponding to the instance's virtual member functions will never be
called.
</Para>
</Sect2>
<Sect2><Title><Literal>None</Literal> and <Literal>NULL</Literal></Title>
<Para>
Throughout the bindings, the <Literal>None</Literal> value can be specified
wherever <Literal>NULL</Literal> is acceptable to the underlying C++ code.
</Para>
<Para>
Equally, <Literal>NULL</Literal> is converted to <Literal>None</Literal>
whenever it is returned by the underlying C++ code.
</Para>
</Sect2>
<Sect2><Title>Support for C++ <Literal>void *</Literal> Data Types</Title>
<Para>
PyQt represents <Literal>void *</Literal> values as objects of type
<Literal>sip.voidptr</Literal>. Such values are often used to pass the
addresses of external objects between different Python modules. To make this
easier, a Python integer (or anything that Python can convert to an integer)
can be used whenever a <Literal>sip.voidptr</Literal> is expected.
</Para>
<Para>
A <Literal>sip.voidptr</Literal> may be converted to a Python integer by using
the <Literal>int()</Literal> builtin function.
</Para>
<Para>
A <Literal>sip.voidptr</Literal> may be converted to a Python string by using
its <Literal>asstring()</Literal> method. The <Literal>asstring()</Literal>
method takes an integer argument which is the length of the data in bytes.
</Para>
</Sect2>
<Sect2><Title>Support for Threads</Title>
<Para>
PyQt implements the full set of Qt's thread classes. Python, of course, also
has its own thread extension modules. If you are using SIP v4 (or later) and
Python v2.3.5 (or later) then PyQt does not impose any additional restrictions.
(Read the relevant part of the Qt documentation to understand the restrictions
imposed by the Qt API.)
</Para>
<Para>
If you are using earlier versions of either SIP or Python then it is possible
to use either of the APIs so long as you follow some simple rules.
</Para>
<ItemizedList>
<ListItem>
<Para>
If you use the Qt API then the very first <Literal>import</Literal> of one of
the PyQt modules must be done from the main thread.
</Para>
</ListItem>
<ListItem>
<Para>
If you use the Python API then all calls to PyQt (including any
<Literal>import</Literal>s) must be done from one thread only. Therefore, if
you want to make calls to PyQt from several threads then you must use the Qt
API.
</Para>
</ListItem>
<ListItem>
<Para>
If you want to use both APIs in the same application then all calls to PyQt
must be done from threads created using the Qt API.
</Para>
</ListItem>
</ItemizedList>
<Para>
The above comments actually apply to any SIP generated module, not just PyQt.
</Para>
</Sect2>
<Sect2><Title>Garbage Collection</Title>
<Para>
C++ does not garbage collect unreferenced class instances, whereas Python does.
In the following C++ fragment both colours exist even though the first can no
longer be referenced from within the program:
</Para>
<ProgramListing>
c = new QColor();
c = new QColor();
</ProgramListing>
<Para>
In the corresponding Python fragment, the first colour is destroyed when
the second is assigned to <Literal>c</Literal>:
</Para>
<ProgramListing>
c = QColor()
c = QColor()
</ProgramListing>
<Para>
In Python, each colour must be assigned to different names. Typically this
is done within class definitions, so the code fragment would be something like:
</Para>
<ProgramListing>
self.c1 = QColor()
self.c2 = QColor()
</ProgramListing>
<Para>
Sometimes a Qt class instance will maintain a pointer to another instance and
will eventually call the destructor of that second instance. The most common
example is that a <Literal>QObject</Literal> (and any of its sub-classes) keeps
pointers to its children and will automatically call their destructors. In
these cases, the corresponding Python object will also keep a reference to the
corresponding child objects.
</Para>
<Para>
So, in the following Python fragment, the first <Literal>QLabel</Literal> is
not destroyed when the second is assigned to <Literal>l</Literal> because the
parent <Literal>QWidget</Literal> still has a reference to it.
</Para>
<ProgramListing>
p = QWidget()
l = QLabel('First label',p)
l = QLabel('Second label',p)
</ProgramListing>
</Sect2>
<Sect2><Title>C++ Variables</Title>
<Para>
Access to C++ variables is supported. They are accessed as Python instance
variables. For example:
</Para>
<ProgramListing>
tab = QTab()
tab.label = "First Tab"
tab.r = QRect(10,10,75,30)
</ProgramListing>
<Para>
Global variables and static class variables are effectively read-only. They
can be assigned to, but the underlying C++ variable will not be changed. This
may change in the future.
</Para>
<Para>
Access to protected C++ class variables is not supported. This may change in
the future.
</Para>
</Sect2>
<Sect2><Title>Multiple Inheritance</Title>
<Para>
It is not possible to define a new Python class that sub-classes from more than
one Qt class.
</Para>
</Sect2>
<Sect2><Title>i18n Support</Title>
<Para>
Qt implements i18n support through the Qt Linguist application, the
<Literal>QTranslator</Literal> class, and the
<Literal>QApplication::translate()</Literal>, <Literal>QObject::tr()</Literal>
and <Literal>QObject::trUtf8()</Literal> methods. Usually the
<Literal>tr()</Literal> method is used to obtain the correct translation of a
message. The translation process uses a message context to allow the same
message to be translated differently. <Literal>tr()</Literal> is actually
generated by <Literal>moc</Literal> and uses the hardcoded class name as the
context. On the other hand, <Literal>QApplication::translate()</Literal>
allows to context to be explicitly stated.
</Para>
<Para>
Unfortunately, because of the way Qt implents <Literal>tr()</Literal> (and
<Literal>trUtf8()</Literal>) it is not possible for PyQt to exactly reproduce
its behavour. The PyQt implementation of <Literal>tr()</Literal> (and
<Literal>trUtf8()</Literal>) uses the class name of the instance as the
context. The key difference, and the source of potential problems, is that the
context is determined dynamically in PyQt, but is hardcoded in Qt. In other
words, the context of a translation may change depending on an instance's class
hierarchy.
</Para>
<ProgramListing>
class A(QObject):
def __init__(self):
QObject.__init__(self)
def hello(self):
return self.tr("Hello")
class B(A):
def __init__(self):
A.__init__(self)
a = A()
a.hello()
b = B()
b.hello()
</ProgramListing>
<Para>
In the above the message is translated by <Literal>a.hello()</Literal> using a
context of <Literal>A</Literal>, and by <Literal>b.hello()</Literal> using a
context of <Literal>B</Literal>. In the equivalent C++ version the context
would be <Literal>A</Literal> in both cases.
</Para>
<Para>
The PyQt behaviour is unsatisfactory and may be changed in the future. It is
recommended that <Literal>QApplication.translate()</Literal> be used in
preference to <Literal>tr()</Literal> (and <Literal>trUtf8()</Literal>). This
is guaranteed to work with current and future versions of PyQt and makes it
much easier to share message files between Python and C++ code. Below is the
alternative implementation of <Literal>A</Literal> that uses
<Literal>QApplication.translate()</Literal>.
</Para>
<ProgramListing>
class A(QObject):
def __init__(self):
QObject.__init__(self)
def hello(self):
return qApp.translate("A","Hello")
</ProgramListing>
<Para>
Note that the code generated by <Literal>pyuic</Literal> uses
<Literal>QApplication.translate()</Literal>.
</Para>
</Sect2>
</Sect1>
<Sect1><Title>Signal and Slot Support</Title>
<Para>
A signal may be either a Qt signal (specified using
<Literal>SIGNAL()</Literal>) or a Python signal (specified using
<Literal>PYSIGNAL()</Literal>).
</Para>
<Para>
A slot can be either a Python callable object, a Qt signal (specified using
<Literal>SIGNAL()</Literal>), a Python signal (specified using
<Literal>PYSIGNAL()</Literal>), or a Qt slot (specified using
<Literal>SLOT()</Literal>).
</Para>
<Para>
You connect signals to slots (and other signals) as you would from C++. For
example:
</Para>
<ProgramListing>
QObject.connect(a,SIGNAL("QtSig()"),pyFunction)
QObject.connect(a,SIGNAL("QtSig()"),pyClass.pyMethod)
QObject.connect(a,SIGNAL("QtSig()"),PYSIGNAL("PySig"))
QObject.connect(a,SIGNAL("QtSig()"),SLOT("QtSlot()"))
QObject.connect(a,PYSIGNAL("PySig"),pyFunction)
QObject.connect(a,PYSIGNAL("PySig"),pyClass.pyMethod)
QObject.connect(a,PYSIGNAL("PySig"),SIGNAL("QtSig()"))
QObject.connect(a,PYSIGNAL("PySig"),SLOT("QtSlot()"))
</ProgramListing>
<Para>
When a slot is a Python method that corresponds to a Qt slot then a signal can
be connected to either the Python method or the Qt slot. The following
connections achieve the same effect.
</Para>
<ProgramListing>
sbar = QScrollBar()
lcd = QLCDNumber()
QObject.connect(sbar,SIGNAL("valueChanged(int)"),lcd.display)
QObject.connect(sbar,SIGNAL("valueChanged(int)"),lcd,SLOT("display(int)"))
</ProgramListing>
<Para>
The difference is that the second connection is made at the C++ level and is
more efficient.
</Para>
<Para>
Disconnecting signals works in exactly the same way.
</Para>
<Para>
Any instance of a class that is derived from the <Literal>QObject</Literal>
class can emit a signal using the <Literal>emit</Literal> method. This takes
two arguments. The first is the Python or Qt signal, the second is a Python
tuple which are the arguments to the signal. For example:
</Para>
<ProgramListing>
a.emit(SIGNAL("clicked()"),())
a.emit(PYSIGNAL("pySig"),("Hello","World"))
</ProgramListing>
<Para>
Note that when a slot is a Python callable object its reference count is not
increased. This means that a class instance can be deleted without having to
explicitly disconnect any signals connected to its methods. However, it also
means that using lambda expressions as slots will not work unless you keep a
separate reference to the expression to prevent it from being immediately
garbage collected.
</Para>
<Para>
Qt allows a signal to be connected to a slot that requires fewer arguments than
the signal passes. The extra arguments are quietly discarded. Python slots
can be used in the same way.
</Para>
</Sect1>
<Sect1><Title>Static Member Functions</Title>
<Para>
Static member functions are implemented as Python class functions.
For example the C++ static member function
<Literal>QObject::connect()</Literal> is called from Python as
<Literal>QObject.connect()</Literal> or <Literal>self.connect()</Literal> if
called from a sub-class of <Literal>QObject</Literal>.
</Para>
</Sect1>
<Sect1><Title>Enumerated Types</Title>
<Para>
Enumerated types are implemented as a set of simple variables corresponding to
the separate enumerated values.
</Para>
<Para>
When using an enumerated value the name of the class (or a sub-class) in which
the enumerated type was defined in must be included. For example:
</Para>
<ProgramListing>
Qt.SolidPattern
QWidget.TabFocus
QFrame.TabFocus
</ProgramListing>
</Sect1>
<Sect1><Title>Module Reference Documentation</Title>
<Para>
The following sections should be used in conjunction with the normal class
documentation - only the differences specific to the Python bindings are
documented here.
</Para>
<Para>
In these sections, <Emphasis>Not yet implemented</Emphasis>
implies that the feature can be easily implemented if needed. <Emphasis>Not
implemented</Emphasis> implies that the feature will not be implemented, either
because it cannot be or because it is not appropriate.
</Para>
<Para>
If a class is described as being <Emphasis>fully implemented</Emphasis> then
all non-private member functions and all public class variables have been
implemented.
</Para>
<Para>
If an operator has been implemented then it is stated explicitly.
</Para>
<Para>
Classes that are not mentioned have not yet been implemented.
</Para>
</Sect1>
<Sect1><Title><Literal>qt</Literal> Module Reference</Title>
%End
%Include qt/qglobal.sip
%Include qt/qwindowdefs.sip
%Include qt/qnamespace.sip
%Include qt/qaccel.sip
%Include qt/qaction.sip
%Include qt/qapplication.sip
%Include qt/qassistantclient.sip
%Include qt/qbitmap.sip
%Include qt/qbrush.sip
%Include qt/qbutton.sip
%Include qt/qbuttongroup.sip
%Include qt/qbytearray.sip
%Include qt/qcdestyle.sip
%Include qt/qcheckbox.sip
%Include qt/qclipboard.sip
%Include qt/qcolor.sip
%Include qt/qcolordialog.sip
%Include qt/qcolorgroup.sip
%Include qt/qcombobox.sip
%Include qt/qcommonstyle.sip
%Include qt/qcstring.sip
%Include qt/qcursor.sip
%Include qt/qdatastream.sip
%Include qt/qdatetime.sip
%Include qt/qdatetimeedit.sip
%Include qt/qdesktopwidget.sip
%Include qt/qdial.sip
%Include qt/qdialog.sip
%Include qt/qdir.sip
%Include qt/qdockarea.sip
%Include qt/qdockwindow.sip
%Include qt/qdragobject.sip
%Include qt/qdrawutil.sip
%Include qt/qdropsite.sip
%Include qt/qerrormessage.sip
%Include qt/qevent.sip
%Include qt/qeventloop.sip
%Include qt/qfile.sip
%Include qt/qfiledialog.sip
%Include qt/qfileinfo.sip
%Include qt/qfont.sip
%Include qt/qfontdatabase.sip
%Include qt/qfontdialog.sip
%Include qt/qfontinfo.sip
%Include qt/qfontmetrics.sip
%Include qt/qframe.sip
%Include qt/qgmanager.sip
%Include qt/qgrid.sip
%Include qt/qgridview.sip
%Include qt/qgroupbox.sip
%Include qt/qhbox.sip
%Include qt/qhbuttongroup.sip
%Include qt/qheader.sip
%Include qt/qhgroupbox.sip
%Include qt/qiconset.sip
%Include qt/qiconview.sip
%Include qt/qimage.sip
%Include qt/qinputdialog.sip
%Include qt/qinterlacestyle.sip
%Include qt/qiodevice.sip
%Include qt/qkeycode.sip
%Include qt/qkeysequence.sip
%Include qt/qlabel.sip
%Include qt/qlayout.sip
%Include qt/qlcdnumber.sip
%Include qt/qlibrary.sip
%Include qt/qlineedit.sip
%Include qt/qlist.sip
%Include qt/qlistbox.sip
%Include qt/qlistview.sip
%Include qt/qlocale.sip
%Include qt/qmainwindow.sip
%Include qt/qmemarray.sip
%Include qt/qmenubar.sip
%Include qt/qmenudata.sip
%Include qt/qmessagebox.sip
%Include qt/qmetaobject.sip
%Include qt/qmime.sip
%Include qt/qmotifplusstyle.sip
%Include qt/qmotifstyle.sip
%Include qt/qmovie.sip
%Include qt/qmultilinedit.sip
%Include qt/qmutex.sip
%Include qt/qnetworkprotocol.sip
%Include qt/qobject.sip
%Include qt/qobjectcleanuphandler.sip
%Include qt/qobjectlist.sip
%Include qt/qpaintdevicemetrics.sip
%Include qt/qpaintdevice.sip
%Include qt/qpainter.sip
%Include qt/qpalette.sip
%Include qt/qpixmap.sip
%Include qt/qpixmapcache.sip
%Include qt/qpair.sip
%Include qt/qpen.sip
%Include qt/qpicture.sip
%Include qt/qplatinumstyle.sip
%Include qt/qpoint.sip
%Include qt/qpointarray.sip
%Include qt/qpopupmenu.sip
%Include qt/qprintdialog.sip
%Include qt/qprinter.sip
%Include qt/qprocess.sip
%Include qt/qprogressbar.sip
%Include qt/qprogressdialog.sip
%Include qt/qptrlist.sip
%Include qt/qpushbutton.sip
%Include qt/qradiobutton.sip
%Include qt/qrangecontrol.sip
%Include qt/qrect.sip
%Include qt/qregexp.sip
%Include qt/qregion.sip
%Include qt/qscrollbar.sip
%Include qt/qscrollview.sip
%Include qt/qsemaphore.sip
%Include qt/qsemimodal.sip
%Include qt/qsessionmanager.sip
%Include qt/qsettings.sip
%Include qt/qsgistyle.sip
%Include qt/qsignalmapper.sip
%Include qt/qsimplerichtext.sip
%Include qt/qsize.sip
%Include qt/qsizegrip.sip
%Include qt/qsizepolicy.sip
%Include qt/qslider.sip
%Include qt/qsocketnotifier.sip
%Include qt/qsound.sip
%Include qt/qspinbox.sip
%Include qt/qsplashscreen.sip
%Include qt/qsplitter.sip
%Include qt/qstatusbar.sip
%Include qt/qstring.sip
%Include qt/qstringlist.sip
%Include qt/qstrlist.sip
%Include qt/qstyle.sip
%Include qt/qstylesheet.sip
%Include qt/qsyntaxhighlighter.sip
%Include qt/qtabbar.sip
%Include qt/qtabdialog.sip
%Include qt/qtableview.sip
%Include qt/qtabwidget.sip
%Include qt/qtextbrowser.sip
%Include qt/qtextcodec.sip
%Include qt/qtextedit.sip
%Include qt/qtextstream.sip
%Include qt/qtextview.sip
%Include qt/qthread.sip
%Include qt/qtimer.sip
%Include qt/qtoolbar.sip
%Include qt/qtoolbox.sip
%Include qt/qtoolbutton.sip
%Include qt/qtooltip.sip
%Include qt/qtranslator.sip
%Include qt/qurl.sip
%Include qt/qurlinfo.sip
%Include qt/qurloperator.sip
%Include qt/quuid.sip
%Include qt/qvalidator.sip
%Include qt/qvaluelist.sip
%Include qt/qvariant.sip
%Include qt/qvbox.sip
%Include qt/qvbuttongroup.sip
%Include qt/qvgroupbox.sip
%Include qt/qwaitcondition.sip
%Include qt/qwhatsthis.sip
%Include qt/qwidget.sip
%Include qt/qwidgetlist.sip
%Include qt/qwidgetstack.sip
%Include qt/qwindow.sip
%Include qt/qwindowsstyle.sip
%Include qt/qwindowsxpstyle.sip
%Include qt/qwizard.sip
%Include qt/qwmatrix.sip
%Include qt/qworkspace.sip
%ExportedDoc
</Sect1>
%End
%ExportedDoc
<Sect1><Title><Literal>qtaxcontainer</Literal> Module Reference</Title>
%End
%Include qtaxcontainer/qaxbase.sip
%Include qtaxcontainer/qaxobject.sip
%Include qtaxcontainer/qaxwidget.sip
%ExportedDoc
</Sect1>
%End
%ExportedDoc
<Sect1><Title><Literal>qtcanvas</Literal> Module Reference</Title>
%End
%Include qtcanvas/qcanvas.sip
%ExportedDoc
</Sect1>
%End
%ExportedDoc
<Sect1><Title><Literal>qtext</Literal> Module Reference</Title>
<Sect2><Title>QextScintilla</Title>
<FuncSynopsis>
<FuncDef>void <Function>getCursorPosition</Function></FuncDef>
<ParamDef>int *<Parameter>line</Parameter></ParamDef>
<ParamDef>int *<Parameter>index</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes no parameters and returns a tuple of the values returned by the
<Literal>line</Literal> and <Literal>index</Literal> pointers.
</Para>
<FuncSynopsis>
<FuncDef>void <Function>getSelection</Function></FuncDef>
<ParamDef>int *<Parameter>lineFrom</Parameter></ParamDef>
<ParamDef>int *<Parameter>indexFrom</Parameter></ParamDef>
<ParamDef>int *<Parameter>lineTo</Parameter></ParamDef>
<ParamDef>int *<Parameter>indexTo</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes no parameters and returns a tuple of the values returned by the
<Literal>lineFrom</Literal>, <Literal>indexFrom</Literal>,
<Literal>lineTo</Literal> and <Literal>indexTo</Literal> pointers.
</Para>
</Sect2>
<Sect2><Title>QextScintillaAPIs</Title>
<Para>
<Literal>QextScintillaAPIs</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaBase</Title>
<Para>
<Literal>QextScintillaBase</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaCommand</Title>
<Para>
<Literal>QextScintillaCommand</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaCommandSet</Title>
<Para>
<Literal>QextScintillaCommandSet</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaDocument</Title>
<Para>
<Literal>QextScintillaDocument</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexer</Title>
<Para>
<Literal>QextScintillaLexer</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerBash (QScintilla v1.4+)</Title>
<Para>
<Literal>QextScintillaLexerBash</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerBatch (QScintilla v1.6+)</Title>
<Para>
<Literal>QextScintillaLexerBatch</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerCPP</Title>
<Para>
<Literal>QextScintillaLexerCPP</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerCSharp</Title>
<Para>
<Literal>QextScintillaLexerCSharp</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerCSS (QScintilla v1.6+)</Title>
<Para>
<Literal>QextScintillaLexerCSS</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerDiff (QScintilla v1.6+)</Title>
<Para>
<Literal>QextScintillaLexerDiff</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerHTML (QScintilla v1.1+)</Title>
<Para>
<Literal>QextScintillaLexerHTML</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerIDL</Title>
<Para>
<Literal>QextScintillaLexerIDL</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerJava</Title>
<Para>
<Literal>QextScintillaLexerJava</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerJavaScript</Title>
<Para>
<Literal>QextScintillaLexerJavaScript</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerLua (QScintilla v1.5+)</Title>
<Para>
<Literal>QextScintillaLexerLua</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerMakefile (QScintilla v1.6+)</Title>
<Para>
<Literal>QextScintillaLexerMakefile</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerPerl</Title>
<Para>
<Literal>QextScintillaLexerPerl</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerPOV (QScintilla v1.6+)</Title>
<Para>
<Literal>QextScintillaLexerPOV</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerProperties (QScintilla v1.6+)</Title>
<Para>
<Literal>QextScintillaLexerProperties</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerPython</Title>
<Para>
<Literal>QextScintillaLexerPython</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerRuby (QScintilla v1.5+)</Title>
<Para>
<Literal>QextScintillaLexerRuby</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerSQL (QScintilla v1.1+)</Title>
<Para>
<Literal>QextScintillaLexerSQL</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaLexerTeX (QScintilla v1.6+)</Title>
<Para>
<Literal>QextScintillaLexerTeX</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaMacro</Title>
<Para>
<Literal>QextScintillaMacro</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QextScintillaPrinter</Title>
<Para>
<Literal>QextScintillaPrinter</Literal> is fully implemented.
</Para>
</Sect2>
%End
%ExportedDoc
</Sect1>
%End
%ExportedDoc
<Sect1><Title><Literal>qtgl</Literal> Module Reference</Title>
%End
%Include qtgl/qgl.sip
%Include qtgl/qglcolormap.sip
%ExportedDoc
</Sect1>
%End
%ExportedDoc
<Sect1><Title><Literal>qtnetwork</Literal> Module Reference</Title>
%End
%Include qtnetwork/qdns.sip
%Include qtnetwork/qftp.sip
%Include qtnetwork/qhostaddress.sip
%Include qtnetwork/qhttp.sip
%Include qtnetwork/qlocalfs.sip
%Include qtnetwork/qnetwork.sip
%Include qtnetwork/qserversocket.sip
%Include qtnetwork/qsocket.sip
%Include qtnetwork/qsocketdevice.sip
%ExportedDoc
</Sect1>
%End
%ExportedDoc
<Sect1><Title><Literal>qtpe</Literal> Module Reference</Title>
<Sect2><Title>QPEApplication</Title>
<FuncSynopsis>
<FuncDef><Function>QApplication</Function></FuncDef>
<ParamDef>int& <Parameter>argc</Parameter></ParamDef>
<ParamDef>char **<Parameter>argv</Parameter></ParamDef>
<ParamDef>Type <Parameter>type</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes two parameters, the first of which is a list of argument strings.
Arguments used by Qt are removed from the list.
</Para>
<FuncSynopsis>
<FuncDef>int <Function>exec</Function></FuncDef>
<ParamDef></ParamDef>
</FuncSynopsis>
<Para>
This has been renamed to <Literal>exec_loop</Literal> in Python.
</Para>
</Sect2>
<Sect2><Title>AppLnk</Title>
<FuncSynopsis>
<FuncDef>virtual QString <Function>exec</Function> const</FuncDef>
<ParamDef></ParamDef>
</FuncSynopsis>
<Para>
This has been renamed to <Literal>exec_property</Literal> in Python.
</Para>
</Sect2>
<Sect2><Title>AppLnkSet</Title>
<Para>
<Literal>AppLnkSet</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>Config</Title>
<Para>
<Literal>Config</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>DateFormat</Title>
<Para>
<Literal>DateFormat</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>DocLnk</Title>
<FuncSynopsis>
<FuncDef>QString <Function>exec</Function> const</FuncDef>
<ParamDef></ParamDef>
</FuncSynopsis>
<Para>
This has been renamed to <Literal>exec_property</Literal> in Python.
</Para>
</Sect2>
<Sect2><Title>DocLnkSet</Title>
<Para>
<Literal>DocLnkSet</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>FileManager</Title>
<Para>
<Literal>FileManager</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>FileSelector</Title>
<Para>
<Literal>FileSelector</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>FileSelectorItem</Title>
<Para>
<Literal>FileSelectorItem</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>FontDatabase</Title>
<Para>
<Literal>FontDatabase</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>Global</Title>
<FuncSynopsis>
<FuncDef>static void <Function>setBuiltinCommands</Function></FuncDef>
<ParamDef>Command *</ParamDef>
</FuncSynopsis>
<Para>
Not implemented.
</Para>
</Sect2>
<Sect2><Title>MenuButton</Title>
<Para>
<Literal>MenuButton</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QCopEnvelope</Title>
<Para>
<Literal>QCopEnvelope</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QDawg</Title>
<Para>
<Literal>QDawg</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QPEMenuBar</Title>
<Para>
<Literal>QPEMenuBar</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>QPEToolBar</Title>
<Para>
<Literal>QPEToolBar</Literal> is fully implemented.
</Para>
</Sect2>
<Sect2><Title>Resource</Title>
<Para>
<Literal>Resource</Literal> is fully implemented.
</Para>
</Sect2>
</Sect1>
%End
%ExportedDoc
<Sect1><Title><Literal>qtsql</Literal> Module Reference</Title>
%End
%Include qtsql/qdatabrowser.sip
%Include qtsql/qdatatable.sip
%Include qtsql/qdataview.sip
%Include qtsql/qeditorfactory.sip
%Include qtsql/qsql.sip
%Include qtsql/qsqlcursor.sip
%Include qtsql/qsqldatabase.sip
%Include qtsql/qsqldriver.sip
%Include qtsql/qsqleditorfactory.sip
%Include qtsql/qsqlerror.sip
%Include qtsql/qsqlfield.sip
%Include qtsql/qsqlform.sip
%Include qtsql/qsqlindex.sip
%Include qtsql/qsqlpropertymap.sip
%Include qtsql/qsqlquery.sip
%Include qtsql/qsqlrecord.sip
%Include qtsql/qsqlresult.sip
%Include qtsql/qsqlselectcursor.sip
%ExportedDoc
</Sect1>
%End
%ExportedDoc
<Sect1><Title><Literal>qttable</Literal> Module Reference</Title>
%End
%Include qttable/qtable.sip
%ExportedDoc
</Sect1>
%End
%ExportedDoc
<Sect1><Title><Literal>qtui</Literal> Module Reference</Title>
%End
%Include qtui/qwidgetfactory.sip
%ExportedDoc
</Sect1>
%End
%ExportedDoc
<Sect1><Title><Literal>qtxml</Literal> Module Reference</Title>
%End
%Include qtxml/qdom.sip
%ExportedDoc
</Sect1>
%End
%Doc
</Article>
%End