[PyQt] problems with PyQt book custom view examples [Win7]
list at qtrac.plus.com
Tue Dec 8 11:48:17 GMT 2009
On 2009-12-08, Romi Agar wrote:
> For example chapter 6: imagechanger_ans.pyw. It remebers the window size
> and log window position, but not the last accessed images.
> I think that this has something to do with using QStrings.
> I just tested the chapter 16 carhirelog.pyw example. By default it does
> show the content of License, Customer and Notes columns. But what do they
> have in common? In CarHireLog class, they are all stored as QStrings.
> Removing the conversion to QString from the initializer and voilaa - it
> works. Maybe the recent files problem comes also from QString usage or
> QStringList conversion - haven't tested yet.
Ah, okay, it sounds like you're on the right track. Maybe your PyQt is
using API 2 rather than API 1---all the examples only work for API 1
(which was the only API that existed when the book was written). But API
2 is not supposed to be the default for Python 2 and you say you're
using Python 2.6...
> 2009/12/8 Mark Summerfield <list at qtrac.plus.com>
> > On 2009-12-08, Romi Agar wrote:
> > > Everything else seems to be working apart from the little bug with
> > > saving application settings to Windows registry. It does "remember"
> > > the application size and position, but recently used files do not get
> > > loaded when the program is relaunched. I checked, that recently used
> > > program data gets written to the registry (at least some kind of byte
> > > array) on application termination, but somewhere in the application
> > > loading process it gets lost or is not recognised.
> > In which particular example(s) does that occur?
> > > 2009/12/8 Mark Summerfield <mark at qtrac.eu>
> > >
> > > > On 2009-12-08, Romi Agar wrote:
> > > > > Hi!
> > > > >
> > > > > I seem to be experiencing some problems with custom view examples
> > > > > in PyQt book. I'm running Win 7 x64, Python 2.6.4rc2, PyQt 4.6.2.
> > > > > The problem is with chapter 14 and 16 custom view applications.
> > > > > When run, they show empty tables (no visible data) with different
> > > > > background color shades on some rows. The Chapter 16 waterquality
> > > > > example has an empty table with 17508 rows. Does someone maybe
> > > > > a solution to this problem?
> > > >
> > > > I just tried all the examples in those chapters with:
> > > > - Python 2.6.2, Qt 4.5.3, PyQt 4.5.1, Linux 32-bit
> > > > - Python 2.6.4, Qt 4.5.3, PyQt 4.6.2, Windows XP 32-bit
> > > > and they ran fine. (I ran them from the console from their own
> > > > directories.)
> > > >
> > > > I don't have Windows 7, so can't test on your platform.
> > > >
> > > > If the problem is with Qt, it might take a while before it is fixed
> > > > since Windows 7 is a "Tier 2" platform for Qt 4.6 (should be Tier 1
> > > > for Qt 4.7), so bugs in Qt for Windows 7 may not get high priority
> > > > yet. http://doc.trolltech.com/4.6/supported-platforms.html
> > > >
> > > > I haven't heard of other people having problems like this with
> > > > Windows
> > 7
> > > > though---at least not yet. And it is hard to know what the problem
> > really
> > > > is, let alone suggest a solution. Do the other examples work okay?
> > > >
> > > > --
> > > > Mark Summerfield, Qtrac Ltd, www.qtrac.eu
> > > > C++, Python, Qt, PyQt - training and consultancy
> > > > "Advanced Qt Programming" - ISBN 0321635906
> > --
> > Mark Summerfield, Qtrac Ltd, www.qtrac.eu
> > C++, Python, Qt, PyQt - training and consultancy
> > "Advanced Qt Programming" - ISBN 0321635906
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
C++, Python, Qt, PyQt - training and consultancy
"Programming in Python 3 (Second Edition)" - ISBN 0321680561
More information about the PyQt