ANN: PyQt v4.1 Released

P

Phil Thompson

Riverbank Computing is pleased to announce the release of PyQt v4.1
available from http://www.riverbankcomputing.co.uk/pyqt/.

The highlights of this release include:

- support for Qt v4.2 including QGraphicsView and related classes, the undo
framework, widget stylesheets, and integration with GNOME (both visually and
the event loop)
- the addition of the QtTest module for automated GUI testing
- the addition of the QAxContainer module for Windows for integrating ActiveX
controls.

PyQt is a comprehensive set of Qt bindings for the Python programming language
and supports the same platforms as Qt (Windows, Linux and MacOS/X). Like Qt,
PyQt is available under the GPL and a commercial license.

See http://www.riverbankcomputing.com/Docs/PyQt4/html/classes.html for the
class documentation.

PyQt v4 supports Qt v4 (http://www.trolltech.com/products/qt/index.html).
PyQt v3 is still available to support earlier versions of Qt.

PyQt v4 is implemented as a set of 10 extension modules containing
approximately 400 classes and 6,000 functions and methods.

QtCore
The non-GUI infrastructure including event loops, threads, i18n, Unicode,
signals and slots, user and application settings.

QtGui
A rich collection of GUI widgets.

QtNetwork
A set of classes to support TCP and UDP socket programming and higher
level protocols (eg. HTTP).

QtOpenGL
A set of classes that allows PyOpenGL to render onto Qt widgets.

QtSql
A set of classes that implement SQL data models and interfaces to industry
standard databases. Includes an implementation of SQLite.

QtSvg
A set of classes to render SVG files onto Qt widgets.

QtTest
A set of classes to automate unit testing of PyQt applications and GUIs.

QtXML
A set of classes that implement DOM and SAX parsers.

QtAssistant
A set of classes that enables the Qt Assistant online help browser to be
integrated with an application.

QAxContainer
A set of classes for Windows that allows the integration of ActiveX
controls and COM objects.

A Windows installer is provided for the GPL version of PyQt to be used with
the GPL version of Qt v4 (http://www.trolltech.com/download/qt/windows.html).
It enabes a complete PyQt environment to be installed on Windows without the
need for a C++ compiler.

PyQt includes the pyuic utility which generates Python code to implement user
interfaces created with Qt Designer in the same way that the uic utility
generates C++ code. It is also able to load Designer XML files dynamically.

Phil
 
T

Tool69

Thanks Phil,
Can you put some hints about how to build QScintilla2 on Windows please
?
 
P

Phil Thompson

Thanks Phil,
Can you put some hints about how to build QScintilla2 on Windows please
?

You mean something other than the installation instructions?

Phil
 
P

Phil Thompson

What's the best way to learn pyqt. Do the examples from the book GUI
Programming with Python: QT Edition still work? Is the material from
the book mostly valid or have things changed quite a bit?

http://www.commandprompt.com/community/pyqt/

The basics haven't changed, but Qt v4 covers many more things than Qt v2. I
think it's still perfectly valid for the basics - but API differences
probably mean the examples need some changes.

Phil
 
T

Tool69

Hi Phil,
I followed the docs to build qscintilla2, all is going well with no
errors, but when I launched the PyQt Syntax Highlighter Example,
nothing is highlighted but the first line of text, whereas the C++
sample works well in the demo.
Any hints ?
Thanks.
 
D

David Boddie

Tool69 said:
I followed the docs to build qscintilla2, all is going well with no
errors, but when I launched the PyQt Syntax Highlighter Example,
nothing is highlighted but the first line of text, whereas the C++
sample works well in the demo.

Do you mean the example from the PyQt4 distribution? That uses a port
of an old syntax highlighting example from Qt 4.0. Someone needs to
"port" the C++ example from Qt 4.2 to PyQt4.

The example itself doesn't actually use QScintilla2 - there used to
be a demo from Qt that was converted to use QScintilla. Maybe that's
been ported to PyQt as well.

David
 
T

Tool69

David Boddie a écrit :

Do you mean the example from the PyQt4 distribution?
Yes, that was it.
That uses a port of an old syntax highlighting example from Qt 4.0. Someone needs to
"port" the C++ example from Qt 4.2 to PyQt4.

So, we've got no sample to use QScintilla2 ??

Thanks,
6TooL9
 
D

David Boddie

Tool69 said:
needs to "port" the C++ example from Qt 4.2 to PyQt4.

So, we've got no sample to use QScintilla2 ??

Well, this should get you started:

import sys
from PyQt4.QtGui import QApplication
from PyQt4.Qsci import QsciScintilla, QsciLexerPython

if __name__ == "__main__":
app = QApplication(sys.argv)
editor = QsciScintilla()
lexer = QsciLexerPython()
editor.setLexer(lexer)
editor.show()
editor.setText(open("qscintilla2_example.py").read())
sys.exit(app.exec_())

QScintilla provides a selection of different lexers, so you might want
to experiment with those.

Good luck!

David
 
T

Tool69

Sorry,
I just tried with other lexers, but I'm having some errors (names not
defined errors) with those ones :
1.lexer = QsciLexerRuby()
2.lexer = QsciLexerTeX()
Are they implemented ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top