473,911 Members | 5,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PyQt Help and Advice

Dear All,

I am fairly new to Python. I have found it an easy language to learn and
a very usefull one for many tasks. Currently I am working on a python
project that involves a GUI and it was suggested that PyQt is the best way to
design that GUI.
However since PyQt is rather new, I have not found much documentation on
it, or examples in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for someone
with almost no GUI experience.
Does anyone have any suggestions?

Ilya

Jul 18 '05 #1
10 2873
Ilya Knizhnik enlightened us with:
However since PyQt is rather new, I have not found much
documentation on it, or examples in it. The only useful
tutorial/book I have found is at www.opendocspublishing.com/pyqt/
but it is not always clear for someone with almost no GUI
experience.


You might want to follow the QT tutorials that come with the QT
documentation. The best way to read the QT docs is through QT
Assistant. You can design GUIs with QT's 'designer' (it's called that
way, very original name) and convert the .ui files to .py files with
'pyuic'.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Jul 18 '05 #2
On Tue, 29 Jul 2003 15:17:40 +0000, Ilya Knizhnik wrote:
However since PyQt is rather new, I have not found much documentation on
it, or examples in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for someone
with almost no GUI experience.
Does anyone have any suggestions?

Ilya


If you're at all familiar with C++, or even if you're not, you'll find
Qt's API docs, http://doc.trolltech.com/3.0/ , very handy. I've found that
pyQt correlates almost exactly with them, except for some str QString
conversion issues. I refer to that all the time when I'm doing PyQt code.
Also, I don't know what OS or distro you're on, but there is a set of pyqt
examples out there. In redhat, I used the PyQt-examples rpm (case
sensitive), which installs a bunch of example programs to
/usr/share/doc/PyQt-examples-[version]. Also. as Sybren mentioned, the Qt
tutorial itself should be useful.. Finally, I'll say that the book you
mentioned is excellent, and a wonder source of example code. I liked it
enough that I bought it, and I'm happy I did.

Good luck with PyQt! The only issues I've had were related to QCanvas not
deleting canvas items (and therefore my program leaking them) if I don't
reuse them. I still haven't figured that out, so I just keep track of the
ones I create and reuse them, in order to prevent memory leaks.

Keith
Jul 18 '05 #3
On Tue, 29 Jul 2003, Ilya Knizhnik wrote:
I am fairly new to Python. I have found it an easy language to
learn and a very usefull one for many tasks. Currently I am working
on a python project that involves a GUI and it was suggested that
PyQt is the best way to design that GUI. However since PyQt is
rather new, I have not found much documentation on it, or examples
in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for
someone with almost no GUI experience. Does anyone have any
suggestions?


http://www.riverbankcomputing.co.uk/pyqt/index.php

Is a good starting point. Subscribe to the mailing list.

Jul 18 '05 #4
Keith Jones enlightened us with:
I've found that pyQt correlates almost exactly with them, except for
some str QString conversion issues.


Another thing to be wary about, is that "exec" is a reserved keyword
in Python. QDialog boxes, QApplication and perhaps some others that
have an exec() method in C++ are called exec_loop() in Python. Took me
a little while to figure out ;-)

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Jul 18 '05 #5
il***@red.seas. upenn.edu (Ilya Knizhnik) writes:
[...]
However since PyQt is rather new, I have not found much documentation on
it, or examples in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for someone
with almost no GUI experience.
Does anyone have any suggestions?


PyQt isn't new. The reason there's not documentation for every API
function is that the Python interface slavishly follows the C++ API
(actually, I believe you can now pay for documentation, but I don't
see the point). The PyQt docs just list the slight deviations from Qt
proper. The Qt docs are excellent, and you really don't need to know
C++ to understand them.
John
Jul 18 '05 #6
On Tuesday 29 July 2003 4:17 pm, Ilya Knizhnik wrote:
Dear All,

I am fairly new to Python. I have found it an easy language to learn and
a very usefull one for many tasks. Currently I am working on a python
project that involves a GUI and it was suggested that PyQt is the best way
to design that GUI.
However since PyQt is rather new, I have not found much documentation on
it, or examples in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for someone
with almost no GUI experience.
Does anyone have any suggestions?

Ilya


To correct one misconception.. .

PyQt was first released on November 1st 1998. There have been 34 releases in
all. The next release, including support for Qt v3.2.0, will be around August
12th. It isn't new.

Phil

Jul 18 '05 #7
On Wed, 30 Jul 2003 00:18:32 +0100, Phil Thompson wrote:

To correct one misconception.. .

PyQt was first released on November 1st 1998. There have been 34 releases in
all. The next release, including support for Qt v3.2.0, will be around August
12th. It isn't new.

Phil

Phil,

Any idea when Qt3.2 will have noncommercial support in windows?
Jul 18 '05 #8
il***@red.seas. upenn.edu (Ilya Knizhnik) wrote in message news:<bg******* ****@netnews.up enn.edu>...
Dear All,

I am fairly new to Python. I have found it an easy language to learn and
a very usefull one for many tasks. Currently I am working on a python
project that involves a GUI and it was suggested that PyQt is the best way to
design that GUI.
However since PyQt is rather new, I have not found much documentation on
it, or examples in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for someone
with almost no GUI experience.
Does anyone have any suggestions?

Ilya


We have a product called PyQtDoc that provides a very nice and
convenient interface for all the PyQt information. You can see
information on it at http://www.thekompany.com/products/pyqtdoc/

Best,
Shawn
Jul 18 '05 #9
Keith Jones enlightened us with:
Any idea when Qt3.2 will have noncommercial support in windows?


Probably when Qt 4.x has been released. If you want to stay current
and free, try Linux instead.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4229
by: Srinath Avadhanula | last post by:
Hello, I am wondering if QT has something like QWaitForNextEvent() function. This function would block execution of the application till another key was pressed and then return the event which occured. Would like to utlize this in a small application I am building: I am trying to create vi key-bindings for a simple QMultiLineEdit
35
7790
by: Vamsi Mudrageda | last post by:
I am kind of new to Python, and after trying and using wxPython, I found it kind of lacking in easy-to-read documentation, speed at loading, and GUI response-time. So I am looking for an another GUI toolkit that is cross-platform for Python, and am leaning toward PyQt (PyGTK is kind of dull looking in comparison). Unfortunately, although TrollTech says Qt is cross-platform, its license strategy has me a bit confused. So here is to...
8
4863
by: simo | last post by:
OK, so I'm at the stage where I want to make a choice between wxPython and PyQt. Currently I'm using wxPython mainly due to the fact that it has GPL Linux and Windows versions. I prefer Qt to wxWindows, but am confused with all the Windows licensing issues. For the moment this is just for my own tinkering and utility apps, but
1
1470
by: Kenneth McDonald | last post by:
I'm trying to get QT, SIP, and PyQt installed so I can try out the Python editor eric. Both sip and qt appear to have compiled and installed properly. Unfortunately, PyQt, after compiling most of the files and starting what I suspect is the final link step, fails with the follwing message (I've included a few lines above for context): --------------- ken% make c++ -prebind -dynamiclib -headerpad_max_install_names -install_name...
10
2227
by: svenn.are | last post by:
Hi, I wanted to run a program that is written in PyQt on my mac, and went over to Riverbank to get PyQ 3.13 and SIP 4.1.1 sources. I followed the installation guide except for the compiling python as Macosx already has python. I had no problem with compiling SIP and also no problem with compiling PyQt nor did I have any error message during make install.
2
2621
by: Erwan Adam | last post by:
Hi all, I try to introduce tooltips in my application written in PyQt (more precisly, in the menubar of my application) but I can't find a way to get the QRect instance associated to a QMenuBar item (neither a QPopupMenu item) I need the QRect 'cause I followed the tooltip.py file given with pyqt to do the job with a re-implementation of "maybeTip( self, pos )".
10
2182
by: Simon John | last post by:
After quite a while of wxPython I'm getting back into PyQt, mainly due to the announcement by Trolltech that they will make a GPL version of Qt4 for Windows (and Phil-T said he will make a PyQt to go with it eventually!) I'm currently using PyQt 3.12 that comes with the BlackAdder demo, it seems to work fine with Python 2.3.5 except that it doesn't support the WinXP look'n'feel, the QStyle "WindowsXP" isn't included, and using a...
1
6096
by: Peter TB Brett | last post by:
Hi folks, Although the PyQt documentation indicates that QGLWidget & friends have been ported to Python for the PyQt bindings, I'm not entirely sure what's necessary to make the normal OpenGL/GLUT interface available. Does PyQt work okay with PyOpenGL? Or is a more complicated workaround needed? If anyone has experience with working with Python/Qt/OpenGL and can offer
1
1354
by: vj | last post by:
Is there a a tutorial or a sample application I can start with (that works with qt4 and pyqt4)? Thanks, VJ
0
9879
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11349
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10921
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10541
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8099
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5940
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6142
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3360
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.