Hi Pradnyesh,
Pradnyesh Sawant wrote:
i'm new to pyQt and am having trouble getting it to work. i have python2.4, qt4 and sip4 installed .... i get the following error:-
import qt
Traceback (most recent call last): File "", line 1, in ? ImportError: No module named qt
PyQt 4 has a different module organization compared to previous versions. You no longer use "import qt" The library has been split functionally and you typically use something like "from PyQt4 import QtCore, QtGui" There are many other differences from previous versions and when I switched directly from 2.13 to 4.0 I got quite a shock - all older programs need significant work to be fixed. Since you're starting from scratch, make sure that you use documentation or books that are up-to-date and refer to Qt 4.x, otherwise you're going to get very confused.
Chirag Wazir http://chirag.freeshell.org
On 17 Dec, 09:27:50 AM, Chirag Wazir wrote:
PyQt 4 has a different module organization compared to previous versions. You no longer use "import qt" The library has been split functionally and you typically use something like "from PyQt4 import QtCore, QtGui" There are many other differences from previous versions and when I
Thanks a lot for that info; actually, i too found a related page: http://lists.kde.org/?l=pykde&m=114373372223490&w=2 which tells me to "import PyQt4" instead of "import qt" but, now my Qs are: 1. i have some d'loaded python scripts (eg: memaid-pyqt), which use "import qt". what'll happen to those scripts? how much rework (if any) is necessary to get them into working condition again? 2. can you kindly provide me with some good pyqt (using qt4 designer) tutorials? the net provides qt4 tuts but not with designer :(
thanks a lot again!
Hi,
On 12/17/06, Pradnyesh Sawant pradnyesh@iitg.ernet.in wrote:
- can you kindly provide me with some good pyqt (using qt4 designer)
tutorials? the net provides qt4 tuts but not with designer :(
Well, you can read about Designer in Qt4 documentation, which comes with the Qt4 source or just fetch the documentation from somewhere. Using Qt 4 Assistant would be fine too. ( If you build Qt4 from source, you pretty much get everything i.e. docs, examples (in C++), assistant, libs etc. )
So read up from the designer docs and use the pyuic for qt4 to convert the ui files to py source. Wouldn't that work?
Cheers!
Pradeepto