[PyQt] Drag and Drop when using designer

2007-10-25 Thread Nahuel Defossé
Hi!

I've made all my gui with designer. I have some List Views there that need 
drag and drop funcitonality so I need to add them some methods to handle the 
drop events properly, and set the accept drops to True... but I can't add 
those methods with setattr, they don't work, it seems I have to subclass the 
List Views.
Is there any way to get the drop thing without altering the set up that 
setupUi method does?

Thanks in advance
Nahuel
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread Mark Summerfield
On 2007-10-24, Gustavo A. Díaz wrote:
 A shame that I can't buy here in Argentina :(
 And the cost for me is to much to buy it in Amazon for example (including
 the international delivery)...

Can't you order it through a local bookseller? Or direct from the
publisher? You don't have to buy it through Amazon---I only mention
Amazon on the book's homepage because it is so well known.

Naturally, I think the cost of the book---even with shipping---will pay
back in terms of time saved when writing PyQt applications:-)

 2007/10/23, Mark Summerfield [EMAIL PROTECTED]:
  Hi,
 
  I am delighted to announce that
 
  Rapid GUI Programming with Python and Qt:
   The Definitive Guide to PyQt Programming
 
  has now been published in the US.
 
  The book is a hardback, 648 pages, ISBN 0132354187.
 
  The foreword was written by Phil Thompson (creator of PyQt), who was
  also one of the book's five technical reviewers.
 
  For a brief overview of the book and the table of contents, etc., see
 
  http://www.qtrac.eu/pyqtbook.html
 
  This web page also has links to places that sell the book, and has the
  full source code for the examples (and model answers to almost every
  exercise) available for downloading.
 
  The book covers PyQt4 (it has no coverage of PyQt3), and is best used
  with Python 2.5 and PyQt 4.2 or better, on Windows, Mac OS X, or an
  X11-based Unix or Linux. No prior knowledge of GUI programming is
  assumed, so don't worry if you've only ever done web programming:-)
 
  Since this is the only book that covers PyQt4 it is automatically the
  best---but I have not been complacent, and have worked extremely hard
  to make the book as accessible, useful, enjoyable, and interesting as
  possible.
 
  (Note for Safari readers: The printed version of the book uses the PDF I
  supplied as is, with fonts and typesetting exactly as I wanted them,
  whereas the Safari online edition was retypeset by the publisher.)
 
  --
  Mark Summerfield, Qtrac Ltd., www.qtrac.eu
 
  ___
  PyQt mailing listPyQt@riverbankcomputing.com
  http://www.riverbankcomputing.com/mailman/listinfo/pyqt



-- 
Mark Summerfield, Qtrac Ltd., www.qtrac.eu



___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Drag and Drop when using designer

2007-10-25 Thread Jan Ekholm
On Thursday 25 October 2007, Nahuel Defossé wrote:
 Hi!

 I've made all my gui with designer. I have some List Views there that need
 drag and drop funcitonality so I need to add them some methods to handle
 the drop events properly, and set the accept drops to True... but I can't
 add those methods with setattr, they don't work, it seems I have to
 subclass the List Views.
 Is there any way to get the drop thing without altering the set up that
 setupUi method does?

You could look into promoting the views on your form. That means you can still 
design with Designer but you end up using your own subclasses. Works fine 
with PyQt too.

-- 
Jan Ekholm
[EMAIL PROTECTED]

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Drag and Drop when using designer

2007-10-25 Thread Andreas Pakulat
On 25.10.07 04:22:39, Nahuel Defossé wrote:
 Hi!
 
 I've made all my gui with designer. I have some List Views there that need 
 drag and drop funcitonality so I need to add them some methods to handle the 
 drop events properly, and set the accept drops to True... but I can't add 
 those methods with setattr, they don't work, it seems I have to subclass the 
 List Views.

I'm not sure if thats really needed, never created itemviews that can do
drag and drop. The puzzle example indicates however that you don't need
to change the listviews, only the underlying model which needs to
provide mimeData and dropMimeData and probably also mimeTypes. Then you
just need to enable the drag/drop on the listviews by setting their dnd
properties to true.

 Is there any way to get the drop thing without altering the set up that 
 setupUi method does?

You should never try to alter the generated code. If a subclass is
really needed you should create a new widget class and use the promoting
feature to have code generated that uses your new widget. See the
designer documentation for how that works.

Andreas

-- 
Future looks spotty.  You will spill soup in late evening.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Drag and Drop when using designer

2007-10-25 Thread Jan Ekholm
On Thursday 25 October 2007, Andreas Pakulat wrote:
 On 25.10.07 04:22:39, Nahuel Defossé wrote:
  Hi!
 
  I've made all my gui with designer. I have some List Views there that
  need drag and drop funcitonality so I need to add them some methods to
  handle the drop events properly, and set the accept drops to True... but
  I can't add those methods with setattr, they don't work, it seems I have
  to subclass the List Views.

 I'm not sure if thats really needed, never created itemviews that can do
 drag and drop. The puzzle example indicates however that you don't need
 to change the listviews, only the underlying model which needs to
 provide mimeData and dropMimeData and probably also mimeTypes. Then you
 just need to enable the drag/drop on the listviews by setting their dnd
 properties to true.

At least I couldn't get DnD to work without subclassing and providing 
something in the dragEnterEvent, dragMoveEvent and dropEvent handlers. But it 
did work fine when following the docs at:

http://doc.trolltech.com/4.3/dnd.html

-- 
Jan Ekholm
[EMAIL PROTECTED]

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Drag and Drop when using designer

2007-10-25 Thread Andreas Pakulat
On 25.10.07 12:30:20, Jan Ekholm wrote:
 On Thursday 25 October 2007, Andreas Pakulat wrote:
  On 25.10.07 04:22:39, Nahuel Defossé wrote:
   Hi!
  
   I've made all my gui with designer. I have some List Views there that
   need drag and drop funcitonality so I need to add them some methods to
   handle the drop events properly, and set the accept drops to True... but
   I can't add those methods with setattr, they don't work, it seems I have
   to subclass the List Views.
 
  I'm not sure if thats really needed, never created itemviews that can do
  drag and drop. The puzzle example indicates however that you don't need
  to change the listviews, only the underlying model which needs to
  provide mimeData and dropMimeData and probably also mimeTypes. Then you
  just need to enable the drag/drop on the listviews by setting their dnd
  properties to true.
 
 At least I couldn't get DnD to work without subclassing and providing 
 something in the dragEnterEvent, dragMoveEvent and dropEvent handlers. But it 
 did work fine when following the docs at:
 
   http://doc.trolltech.com/4.3/dnd.html

Thats mostly for normal QWidget subclasses, the interview classes have
dnd support builtin, based on what the model provides. The puzzle
example demonstrates this pretty well, you have a listview and a normal
qwidget and both have drag and drop capabilities. There's only a
subclass for the QWidget, the listview stays standard - only the model
has proper overrides for the drag/drop methods needed.

Andreas

-- 
You have no real enemies.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] qimage.sip, Lower bound is not a time version

2007-10-25 Thread Stuart McNicholas

Dear pyqt people,
  I am having a problem with pyqt/sip doing what I think is quite a  
simple thing. I have a sip file:


%Module ffmpeg_reader_sip

%Import QtGui/qimage.sip

class FFMPEGReader {
%TypeHeaderCode
#include ffmpeg_reader.h
%End

public:
  FFMPEGReader(const char* filename);
  ~FFMPEGReader();
  QImage ReadFrame();
  int width();
  int height();
};

However, whether I try the command line
/System/Library/Frameworks/Python.framework/Versions/2.3/bin/sip -x  
VendorID -t WS_MACX -x PyQt_NoPrintRangeBug -t Qt_4_3_0 -x  
Py_DateTime -g -I/System/Library/Frameworks/Python.framework/Versions/ 
2.3/share/sip/PyQt4 -c . ffmpeg_reader_sip.sip


or
python  configure.py  (using configure.py file below)

I get the error

sip: /System/Library/Frameworks/Python.framework/Versions/2.3/share/ 
sip/PyQt4/QtGui/qimage.sip:52: Lower bound is not a time version


This is with Qt-4.3, PyQt-4.3.1, sip 4.7.1

Thanks for any help,
Stuart McNicholas

configure.py file:

import os
import sipconfig
from  PyQt4 import pyqtconfig

# The name of the SIP build file generated by SIP and used by the build
# system.
build_file = ffmpeg_reader_sip.sbf

# Get the SIP configuration information.
config = pyqtconfig.Configuration()

# Get the extra SIP flags needed by the imported qt module.  Note that
# this normally only includes those flags (-x and -t) that relate to  
SIP's

# versioning system.
qt_sip_flags = config.pyqt_sip_flags
# Run SIP to generate the code.
os.system( .join([config.sip_bin, -c, ., -b, build_file, - 
I, config.pyqt_sip_dir, qt_sip_flags,ffmpeg_reader_sip.sip]))


# Create the Makefile.
makefile = sipconfig.SIPModuleMakefile(config, build_file)

# Add the library we are wrapping.  The name doesn't include any  
platform

# specific prefixes or extensions (e.g. the lib prefix on UNIX, or the
# .dll extension on Windows).
makefile.extra_libs = [ffmpeg_reader_sip]

# Generate the Makefile itself.
#makefile.generate()
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Drag and Drop when using designer

2007-10-25 Thread Jan Ekholm
On Thursday 25 October 2007, Andreas Pakulat wrote:

 Thats mostly for normal QWidget subclasses, the interview classes have
 dnd support builtin, based on what the model provides. The puzzle
 example demonstrates this pretty well, you have a listview and a normal
 qwidget and both have drag and drop capabilities. There's only a
 subclass for the QWidget, the listview stays standard - only the model
 has proper overrides for the drag/drop methods needed.

Ok, perhaps I should look at the docs once more to try to figure out the 
correct way to do that for my own app. But as subclassing works ok and the 
tree models are just that much too horrible to use I could take a while. :) I 
wonder what someone smoked when designing the models wrt trees...


-- 
Jan Ekholm
[EMAIL PROTECTED]
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] qimage.sip, Lower bound is not a time version

2007-10-25 Thread Phil Thompson
On Thursday 25 October 2007, Stuart McNicholas wrote:
 Dear pyqt people,
I am having a problem with pyqt/sip doing what I think is quite a
 simple thing. I have a sip file:

 %Module ffmpeg_reader_sip

 %Import QtGui/qimage.sip

You need to import the module, not an individual class, ie...

%Import QtGui/QtGuimod.sip

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] qimage.sip, Lower bound is not a time version

2007-10-25 Thread Stuart McNicholas

Dear All,
  Sorry, I sorted it myself anyway:
On 25 Oct 2007, at 11:18, Stuart McNicholas wrote:


Dear pyqt people,
  I am having a problem with pyqt/sip doing what I think is quite a  
simple thing. I have a sip file:


%Module ffmpeg_reader_sip

%Import QtGui/qimage.sip


I changed this to (as a complete guess)

%Import QtGui/QtGuimod.sip

and all is now fine.

Stuart
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Drag and Drop when using designer

2007-10-25 Thread Andreas Pakulat
On 25.10.07 13:23:20, Jan Ekholm wrote:
 On Thursday 25 October 2007, Andreas Pakulat wrote:
 
  Thats mostly for normal QWidget subclasses, the interview classes have
  dnd support builtin, based on what the model provides. The puzzle
  example demonstrates this pretty well, you have a listview and a normal
  qwidget and both have drag and drop capabilities. There's only a
  subclass for the QWidget, the listview stays standard - only the model
  has proper overrides for the drag/drop methods needed.
 
 Ok, perhaps I should look at the docs once more to try to figure out the 
 correct way to do that for my own app. But as subclassing works ok and the 
 tree models are just that much too horrible to use I could take a while. :) I 
 wonder what someone smoked when designing the models wrt trees...

Would you elaborate a bit on that? I mean what exactly is the problem
with the tree models? And exactly which tree models are you talking
about? There are none in Qt itself, except for the QStandardItemModel
which allows to build tree's, but of course is not that suitable if you
have legacy code  that you want to wrap in Qt.

Andreas

-- 
A visit to a strange place will bring fresh work.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread alteo_gange
Le mercredi 24 octobre 2007, Mark Summerfield a écrit :
 On 2007-10-24, alteo_gange wrote:
  Why electronic book is as expensive as paper book?
 
  http://safari.awprofessional.com/9780132354189

 I have no idea how the publisher comes up with the prices! But if there
 is little or no difference, I hope you buy the paper version because it
 uses the PDF I supplied as is, with the fonts and typesetting as I
 wanted them, whereas the publisher retypeset the online version.

But with online access, we have choice:

 How do I access my Rough Cuts title online?
 If you selected Online Access, you can read your Rough Cuts title in HTML on 
 Safari Books Online, download the entire title in PDF format, or do both.

https://ssl.safaribooksonline.com/tryitfree
http://safari.awprofessional.com/9780132354189

?



___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread alteo_gange
Le mercredi 24 octobre 2007, Arne Babenhauserheide a écrit :
 I had thought about buying the electronic book a good time ago, but I
 didn't buy, because there was no get the printed version cheaper if you
 buy the electronic version beforehand option.

 No chance I'd buy both under these conditions.

I agree with you. A reduction of $2.5 on $70...

 Maybe you could ask your publisher kindly to become a bit more realistic, so 
 people begin to get accomodated to the electronic sales.

Maybe.

 Even though I'd have really liked helping in beta-reading the book (I
 became accustomed to always doing a bug-search on any book I read - even on
 fiction :) ).

You should work as publisher. ;)

-- 
alteo_gange


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread Andreas Pakulat
On 25.10.07 13:38:15, alteo_gange wrote:
 Le jeudi 25 octobre 2007, Gustavo A. Díaz a écrit :
  A shame that I can't buy here in Argentina :(
  And the cost for me is to much to buy it in Amazon for example (including
  the international delivery)...
 
 It's a big problem.
 
 I live in France.
 
 With amazon.fr :
 54.47 euros = 77.412764 dollars

In Amazon Germany its even 63.3 euros, which makes about 90 us$, thats
almost double the normal price of the book as shipped in the US. 

I could find it quite a bit cheaper at libri.de, its 42,74 euro there,
which is still more than 10 dollar more than the original price from
prentice hall. If I buy directly from prentice hall, I'd pay 67$
including shipping, AFAICS

I sonder wether its such a special area of interest that those shops
have to lift the price to make any profit from it or wether they're just
insane. 

Andreas

PS: Mark, I know you can't do anything about, just wanted to 

-- 
Are you a turtle?
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] QMessageBox with unicode text fails

2007-10-25 Thread alteo_gange
Le jeudi 25 octobre 2007, David Boddie a écrit :
 3. The default encoding isn't UTF-8

What a shame!

-- 
alteo_gange


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Drag and Drop when using designer

2007-10-25 Thread Andreas Pakulat
On 25.10.07 14:18:05, Jan Ekholm wrote:
 On Thursday 25 October 2007, Andreas Pakulat wrote:
 
  Would you elaborate a bit on that? I mean what exactly is the problem
  with the tree models? And exactly which tree models are you talking
  about? There are none in Qt itself, except for the QStandardItemModel
  which allows to build tree's, but of course is not that suitable if you
  have legacy code  that you want to wrap in Qt.
 
 I mean building a tree model using QAbstractItemModel for a QTreeView. It is 
 one of the tasks in Qt that is not for the faint of heart. The need to 
 manually fiddle with index() and parent() is a mess. I've never understood 
 why the model requires you to provide a two way access system to the data, 
 ie why do you have to be able to tell both the cildren of a given node *and* 
 its parent? The first is obvious, the latter is something I think Qt should 
 take care of internally.

I don't find the creation of a tree model really problematic, I guess if
you want an answer to that question you should contact qt-interest list
or TT directly. I suspect that this is not an artificial requirement,
but actually needed for the stuff to work.

 As it is now most apps likely read in data to some 
 custom data structures, say, lists of lists or similar. You are then more or 
 less required to duplicate this own tree into another structure so that you 
 can add in the stuff Qt needs. See the standard Qt Simple Tree example for 
 an example of the extra datastructure that is required.

Thats not correct. The tree model reads some input data and creates a
tree from that. The input data is discarded after the building of the
tree. You don't always need an intermediate special tree-like structure
to build a Qt model on top of some legacy data, it depends on the
structure of your legacy data.

 What is IMHO missing there is a QAbstractTreeModel that removes most of the 
 gore (such as parent()) and leaves only the relevant pieces for the 
 applications developer to worry about.

This doesn't work, because parent() is different in almost any tree
model. For both list and table view its easy, because parent always
returns QModelIndex(), the same with index, all it has to do is create a
model index with the given row+number, it doesn't need to care about the
given parent.

Andreas

-- 
You are taking yourself far too seriously.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread Mark Summerfield
On 2007-10-25, Andreas Pakulat wrote:
 On 25.10.07 13:38:15, alteo_gange wrote:
  Le jeudi 25 octobre 2007, Gustavo A. Díaz a écrit :
   A shame that I can't buy here in Argentina :(
   And the cost for me is to much to buy it in Amazon for example
   (including the international delivery)...
 
  It's a big problem.
 
  I live in France.
 
  With amazon.fr :
  54.47 euros = 77.412764 dollars

 In Amazon Germany its even 63.3 euros, which makes about 90 us$, thats
 almost double the normal price of the book as shipped in the US.

 I could find it quite a bit cheaper at libri.de, its 42,74 euro there,
 which is still more than 10 dollar more than the original price from
 prentice hall. If I buy directly from prentice hall, I'd pay 67$
 including shipping, AFAICS

 I sonder wether its such a special area of interest that those shops
 have to lift the price to make any profit from it or wether they're just
 insane.

 Andreas

 PS: Mark, I know you can't do anything about, just wanted to

I can understand your frustration. I live in the UK and since the US
dollar lost so much value earlier this year it sometimes seems like it
would be cheaper for me to buy books from the US because UK prices don't
seem to have dropped proportionally.

Of course, I don't have any control over the pricing, and this isn't
just about my particular book---my guess is that outside the US
booksellers sell for whatever they think the market will bear. Despite
this, I still buy technical books because I (usually:-) enjoy reading
them, and they often pay back in terms of time saved.

-- 
Mark Summerfield, Qtrac Ltd., www.qtrac.eu


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread Andreas Pakulat
On 25.10.07 13:33:54, Mark Summerfield wrote:
 On 2007-10-25, Andreas Pakulat wrote:
  On 25.10.07 13:38:15, alteo_gange wrote:
   Le jeudi 25 octobre 2007, Gustavo A. Díaz a écrit :
A shame that I can't buy here in Argentina :(
And the cost for me is to much to buy it in Amazon for example
(including the international delivery)...
  
   It's a big problem.
  
   I live in France.
  
   With amazon.fr :
   54.47 euros = 77.412764 dollars
 
  In Amazon Germany its even 63.3 euros, which makes about 90 us$, thats
  almost double the normal price of the book as shipped in the US.
 
  I could find it quite a bit cheaper at libri.de, its 42,74 euro there,
  which is still more than 10 dollar more than the original price from
  prentice hall. If I buy directly from prentice hall, I'd pay 67$
  including shipping, AFAICS
 
  I sonder wether its such a special area of interest that those shops
  have to lift the price to make any profit from it or wether they're just
  insane.
 
  Andreas
 
  PS: Mark, I know you can't do anything about, just wanted to
 
 I can understand your frustration.

Not really frustration, more astonishment that they get away with it :) 

 Of course, I don't have any control over the pricing, and this isn't
 just about my particular book---my guess is that outside the US
 booksellers sell for whatever they think the market will bear.

Yeah, US citizens would file a lawsuit if they'd see this happening to
them. In good old Europe people just take it as is.

 Despite this, I still buy technical books because I (usually:-) enjoy
 reading them, and they often pay back in terms of time saved.

No doubt, I'd have a shelf full of technical books (and only 3 of them
read), if I'd just have the money ;)

Andreas

-- 
Don't you wish you had more energy... or less ambition?
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Newbie needs help in installing PyQt

2007-10-25 Thread Dick Moores
Win XP, Python 2.5.1

http://www.riverbankcomputing.co.uk/pyqt/download.php says:

===
Binary Packages
The binary installer for Windows contains everything needed for PyQt
development except for Python itself.

PyQt
Qt (with database support for SQLite3 and ODBC)
Qt Designer
Qt Linguist
Qt Assistant
pyuic4
pylupdate4
lrelease
pyrcc4
QScintilla
PyQwt
Qwt
eric IDE
=

So I downloaded PyQt v4 GPL for Windows and Python v2.5
using the link just below the above. It seemed to install OK, and
shows on my Start menu. However, Eric won't load. QT Assistant hangs.
And much of the documentation can't be found, or words to that
effect. Qt Designer does load.

Advice, please.

Dick Moores
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Re: Newbie needs help in installing PyQt

2007-10-25 Thread Thorsten Kampe
* Dick Moores (Thu, 25 Oct 2007 07:25:32 -0700)
 http://www.riverbankcomputing.co.uk/pyqt/download.php says:
 [...]
 So I downloaded PyQt v4 GPL for Windows and Python v2.5 using the
 link just below the above. [...] And much of the documentation
 can't be found, or words to that effect.

That's normal. You have to download Qt from Trolltech and put the HTML 
files into PyQt4/doc/html.

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Re: QMessageBox with unicode text fails

2007-10-25 Thread Thorsten Kampe
* alteo_gange (Thu, 25 Oct 2007 14:08:28 +0200)
 Le jeudi 25 octobre 2007, David Boddie a écrit :
  3. The default encoding isn't UTF-8
 
 What a shame!

Wait for Python 3...

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Re: PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread Thorsten Kampe
* Andreas Pakulat (Thu, 25 Oct 2007 15:36:43 +0200)
 On 25.10.07 13:33:54, Mark Summerfield wrote:
  Of course, I don't have any control over the pricing, and this isn't
  just about my particular book---my guess is that outside the US
  booksellers sell for whatever they think the market will bear.
 
 Yeah, US citizens would file a lawsuit if they'd see this happening to
 them. In good old Europe people just take it as is.

I don't think there is a law in America against overpriced books.

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] QMessageBox with unicode text fails

2007-10-25 Thread Hans-Peter Jansen
Am Donnerstag, 25. Oktober 2007 14:08 schrieb alteo_gange:
 Le jeudi 25 octobre 2007, David Boddie a écrit :
  3. The default encoding isn't UTF-8

 What a shame!

That will change with Python 3000.

hp

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] QMessageBox with unicode text fails

2007-10-25 Thread David Boddie
On Thu Oct 25 13:08:28 BST 2007, alteo_gange wrote:

 Le jeudi 25 octobre 2007, David Boddie a écrit :
  3. The default encoding isn't UTF-8
 
 What a shame!

Indeed! It depends on your system, of course. Some systems may use a default
UTF-8 encoding, but I don't think that's the case on Windows.

David
-- 
David Boddie
Lead Technical Writer, Trolltech ASA

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Re: PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread Andreas Pakulat
On 25.10.07 17:19:51, Thorsten Kampe wrote:
 * Andreas Pakulat (Thu, 25 Oct 2007 15:36:43 +0200)
  On 25.10.07 13:33:54, Mark Summerfield wrote:
   Of course, I don't have any control over the pricing, and this isn't
   just about my particular book---my guess is that outside the US
   booksellers sell for whatever they think the market will bear.
  
  Yeah, US citizens would file a lawsuit if they'd see this happening to
  them. In good old Europe people just take it as is.
 
 I don't think there is a law in America against overpriced books.

No, but that doesn't stop American citizen to file a lawsuit. There's no
law against putting a cat into a microwave oven and turn it on, yet
somebody did it and filed a lawsuit because both things where broken
afterwards and (AFAIK) that person won (or all this is just a myth, but
there are plenty of these and there must be some truth in them).

Andreas

-- 
Tonight's the night: Sleep in a eucalyptus tree.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread David Boddie
On Thu Oct 25 12:56:25 BST 2007, Andreas Pakulat wrote:

 In Amazon Germany its even 63.3 euros, which makes about 90 us$, thats
 almost double the normal price of the book as shipped in the US. 
 
 I could find it quite a bit cheaper at libri.de, its 42,74 euro there,
 which is still more than 10 dollar more than the original price from
 prentice hall. If I buy directly from prentice hall, I'd pay 67$
 including shipping, AFAICS

I thought I'd see if I could find a lower price in the Euro zone, or a price
outside that would correspond to a lower price.

I used kelkoo.co.uk first, then tried their service in other regions. Here's
what I found:

  United Kingdom: 23.75 GBP (~34 EUR)
  http://books.theregister.co.uk/catalog/browse.asp?ref=863830
  Apparently, shipping would be free if the price was over 25 GBP. :-(
  Otherwise, it appears that delivery to Europe is 7.95 GBP (~11 EUR)!
  (http://books.theregister.co.uk/info/payment_delivery.asp)

  Norway: 297 NOK (~38 EUR)
  http://www.capris.no/product.aspx?isbn=0132354187
  Shipping appears to be free (within Norway, I suppose), but that may depend
  on my interpretation of the word fraktfritt!
  (http://www.capris.no/customerservice.aspx)

The first price shouldn't include any tax. I'm not certain what the situation
is with tax on books in Norway, so I don't know if the price is inclusive of
tax or not.

David
-- 
David Boddie
Lead Technical Writer, Trolltech ASA
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Re: PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread Rajeev J Sebastian
On 10/26/07, David J Brooks [EMAIL PROTECTED] wrote:
 I expect the American response to overpriced books is much the same as the
 European one: make a .torrent and put it on the .net

Here in India, publishers usually come out with very cheap editions of
all these technical books (photocopy on low quality paper)

Btw, this is the same with movies as well ... increasing piracy has
caused some Indian companies like Moser Baer to produce extremely
cheap *legal* editions of any given movie - usually latest releases.

They are sold on the roadside alongside cheap Chinese goods or second
hand books. In fact, it is cheaper to buy a legal movie CD than to buy
a blank CD or in fact, to have a nice lunch.

Btw, Mark: congrats on your new book! I'm sure it will really be
helpful for us trying to learn and teach PyQt. I will try to source it
here and recommend it to my students, friends and colleagues.

Regards
Rajeev J Sebastian
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] segmentation fault

2007-10-25 Thread Reinhard Thies
Hi all,

i am new to PyQt an QT as well. 
I just downloaded and installed Qt 4.3.2 and PyQt 4.3.1 from source on my 
Debian based sidux machine.
Everything configured and compiled just fine.
All qt examples are working but if I try the PyQt examples, I always get an 
segmentatin fault.
Any ideas ?

Thanks for any help 
Reinhard
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] segmentation fault

2007-10-25 Thread Hans-Peter Jansen
Am Donnerstag, 25. Oktober 2007 21:59 schrieb Reinhard Thies:
 Hi all,

 i am new to PyQt an QT as well.
 I just downloaded and installed Qt 4.3.2 and PyQt 4.3.1 from source on my
 Debian based sidux machine.
 Everything configured and compiled just fine.
 All qt examples are working but if I try the PyQt examples, I always get
 an segmentatin fault.
 Any ideas ?

Backtrace of a debug build would help us enormously, but why don't you sue 
some slightly older, but ready to be used debian packages. Compiling the 
stuff yourself is doable, but requires some distribution specific knowledge 
of these package builds. Generally, build from tar balls requires you to be 
even more sensible about what is installed with the rest of the system, 
e.g.: probably you have two Qt4 libs installed now in different paths: 
perfect recipe for hard to track down disaster..
If you still want to build the stuff, build deb packages, based on already 
available ones. You will learn a lot from that task, and it will pay off on 
the second install (on a hopefully similar system to the build host).

Good luck,
Pete

No: I don't have/use any debs handy since I'm addicted to rpms. You will 
imagine why, when you start building debs on your own..
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Re: PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread Hans-Peter Jansen
Am Donnerstag, 25. Oktober 2007 21:15 schrieb David J Brooks:

 I expect the American response to overpriced books is much the same as
 the European one: make a .torrent and put it on the .net

Be careful, safari watermarked the rough cuts edition on every user. 

Probably with a highly expensive infrastructure, which would explain their 
stupid price policy. 

Pete
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Qt 4.3+PyQt4.3 and pdb

2007-10-25 Thread Jason Hihn
Whenever I call pdb.set_trace() now in my PyQt4 application, the console
floods with QCoreApplication::exec: The event loop is already running

 

I had used this with no problem under 4.2.3. Can anyone help?

 

Thanks.

 

---

Regards,

Jason Hihn

Director of Software Engineering
Eyemaginations, Inc.

600 Washington Ave, Suite #100
Towson, MD 21204
Domestic: 877.321.5481 ext. 8617
International: 410.321.5481 ext. 8617
Fax: 410.616.8657
[EMAIL PROTECTED]
www.eyemaginations.com
www.3d-eye.com

=
The information transmitted within this email document or fax is intended
only for 

the person(s) or entity to which it is specifically addressed and may
contain 

confidential and/or privileged material of Eyemaginations. Any re-creation,
review, 

distribution, retransmission, dissemination or other use of, or taking of
any action 

in reliance upon, this information by persons or entities other than the
intended 

parties is completely prohibited. If you have received this email in error,
please 

contact the sender or author and permanently delete and destroy the email
from 

any computer which houses its contents. 

=

 

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Qt 4.3+PyQt4.3 and pdb

2007-10-25 Thread Phil Thompson
On Thursday 25 October 2007, Jason Hihn wrote:
 Whenever I call pdb.set_trace() now in my PyQt4 application, the console
 floods with QCoreApplication::exec: The event loop is already running



 I had used this with no problem under 4.2.3. Can anyone help?

You could try calling QtCore.pyqtRemoveInputHook() first, but you need PyQt 
v4.2.1 for this.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Qt 4.3+PyQt4.3 and pdb

2007-10-25 Thread Phil Thompson
On Thursday 25 October 2007, Phil Thompson wrote:
 On Thursday 25 October 2007, Jason Hihn wrote:
  Whenever I call pdb.set_trace() now in my PyQt4 application, the console
  floods with QCoreApplication::exec: The event loop is already running
 
 
 
  I had used this with no problem under 4.2.3. Can anyone help?

 You could try calling QtCore.pyqtRemoveInputHook() first, but you need PyQt
 v4.2.1 for this.

No, I mean PyQt v4.3.1.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread Jim Bublitz
On Thursday 25 October 2007 10:19, David Boddie wrote:
 On Thu Oct 25 12:56:25 BST 2007, Andreas Pakulat wrote:
  In Amazon Germany its even 63.3 euros, which makes about 90 us$, thats
  almost double the normal price of the book as shipped in the US.
 
  I could find it quite a bit cheaper at libri.de, its 42,74 euro there,
  which is still more than 10 dollar more than the original price from
  prentice hall. If I buy directly from prentice hall, I'd pay 67$
  including shipping, AFAICS

 I thought I'd see if I could find a lower price in the Euro zone, or a
 price outside that would correspond to a lower price.

 I used kelkoo.co.uk first, then tried their service in other regions.
 Here's what I found:

   United Kingdom: 23.75 GBP (~34 EUR)
   http://books.theregister.co.uk/catalog/browse.asp?ref=863830
   Apparently, shipping would be free if the price was over 25 GBP. :-(
   Otherwise, it appears that delivery to Europe is 7.95 GBP (~11 EUR)!
   (http://books.theregister.co.uk/info/payment_delivery.asp)

   Norway: 297 NOK (~38 EUR)
   http://www.capris.no/product.aspx?isbn=0132354187
   Shipping appears to be free (within Norway, I suppose), but that may
 depend on my interpretation of the word fraktfritt!
   (http://www.capris.no/customerservice.aspx)

 The first price shouldn't include any tax. I'm not certain what the
 situation is with tax on books in Norway, so I don't know if the price is
 inclusive of tax or not.

I think it makes sense to look around for the best price, but I guess I don't 
understand the complaining about the price.

I've got a copy of Stroustrup's C++ Programming Language that cost me $65 
probably 5 years ago or more. I don't use it much, but the binding is falling 
apart, and it's not even a language I like. And considering what my daughter 
pays for college textbooks (actually what I pay for her books), Mark's book 
seems pretty reasonably priced - this isn't going to make the bestseller 
lists (no reflection on Mark - there just aren't that many PyQt users, 
although I've heard the plot is weak too), or even sell as many copies as the 
average college text.

Considering we get free software that actually works and free, fast online 
support from the author of the software and the author of the book and the 
lead tech writer at TrollTech plus the other really knowledgeable people on 
this list, it doesn't seem to me that the price is that bad when you take all 
that into account.

I can sympathize with people who have a hard time coming up that amount of 
money - I've been there. But then again, esp considering the Windows users 
who fork out a lot of money to Microsoft for software with less quality and 
support (even if it came 'free' with your computer) - I guess I don't think 
it's that bad to send less money than the price of Windows to Mark and 
someone willing to publish him.  He can probably make better use of the money 
than Bill Gates. (I'd say less than Linux too, but I've been buying distros 
at CheapBytes, and most of you probably download).

Divide the cost of the book by 4 for Qt, PyQt, Python and the book itself, and 
the price doesn't look too bad at all.

Just my 2 cents - (and if I post enough of these you can cash them in and  buy 
the book - but do it before the dollar falls even more).

Now I have to go remove the cat from the microwave ...

Jim
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread David Boddie
On Fri Oct 26 01:45:22 BST 2007, Jim Bublitz wrote:

 I think it makes sense to look around for the best price, but I guess I
 don't understand the complaining about the price.

Yes, I agree. I just wanted to show that there are good deals to be found
if you want (or need) to shop around. I found it quite amusing that one of
the best deals was from a bookseller in one of the world's most expensive
countries. :-)

 I've got a copy of Stroustrup's C++ Programming Language that cost me $65
 probably 5 years ago or more. I don't use it much, but the binding is
 falling apart, and it's not even a language I like. And considering what
 my daughter pays for college textbooks (actually what I pay for her books),
 Mark's book seems pretty reasonably priced - this isn't going to make the
 bestseller lists (no reflection on Mark - there just aren't that many PyQt
 users, although I've heard the plot is weak too),

But I bet you didn't expect that plot twist in the final chapter! ;-)

 or even sell as many copies as the average college text.

Maybe not. However, even as an experienced Python programmer, I found
the introduction to Python worth reading - and I was very sceptical about
the need to include it in the book at all. (Apparently, publishers believe
that books about Python need to tell the reader how to use the language
no matter what level they're aimed at!)

 Considering we get free software that actually works and free, fast online
 support from the author of the software and the author of the book and the
 lead tech writer at TrollTech plus the other really knowledgeable people on
 this list, it doesn't seem to me that the price is that bad when you take
 all that into account.

Actually, I'm billing you for the time taken to write this message. ;-)

Seriously, at over 550 pages, I think the book is well worth the retail
price. For a book aimed at GUI programming, it covers a wide range of
topics, and it deals with many of the fundamental concepts and techniques
you need to know when using PyQt4.

In addition, the appendix on installing PyQt looks like it addresses the
usual questions people have, and I expect it was quite distracting and
time-consuming to write.

Note: As a reviewer, I received a copy free of charge, but I would have
bought a copy anyway. I had to squeeze my reviewing duties in between work
and real life, so I didn't really have the time to enjoy the book the first
time around. :-)

David

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Re: PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread David J Brooks
On Thursday 25 October 2007 03:49:04 pm Hans-Peter Jansen wrote:
 Am Donnerstag, 25. Oktober 2007 21:15 schrieb David J Brooks:
  I expect the American response to overpriced books is much the same as
  the European one: make a .torrent and put it on the .net

 Be careful, safari watermarked the rough cuts edition on every user.

 Probably with a highly expensive infrastructure, which would explain their
 stupid price policy.

Don't misunderstand. I intend to buy a print copy rather than a bootleg. It 
won't be the rough cut edition from Safari though. I'll go with the proofread 
final version. I make enough mistakes on my own. ;)

David
-- 
This message is not Y3K compliant.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt book Rapid GUI Programming with Python and Qt now available

2007-10-25 Thread Jim Bublitz
On Thursday 25 October 2007 18:20, David Boddie wrote:

 Note: As a reviewer, I received a copy free of charge, but I would have
 bought a copy anyway. I had to squeeze my reviewing duties in between work
 and real life, so I didn't really have the time to enjoy the book the first
 time around. :-)

Heh - when I was teaching, I'd get a free copy and *paid* to review textbooks. 
Mostly on hardware, but one of my favorites was a text on BASIC for the 
PDP-11 (in the late 1980s - it was obvious PCs would dominate by then), with 
about half the book devoted to simulating logic gates in code. I was 
surprised the check cleared for that review.

I'll probably pick up a copy just because there are some things in Qt4 I still 
haven't found time to get on top of, and some bad habits I should probably 
break.

Jim
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt