[PyQt] problems with PyQt book custom view examples [Win7]

2009-12-08 Thread Romi Agar
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 know a solution to this problem?

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

Re: [PyQt] problems with PyQt book custom view examples [Win7]

2009-12-08 Thread Romi Agar
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.


2009/12/8 Mark Summerfield 

> 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 know 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
>
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] problems with PyQt book custom view examples [Win7]

2009-12-08 Thread Romi Agar
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 not
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.


2009/12/8 Mark Summerfield 

> 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 
> >
> > > 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 know 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
>
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] problems with PyQt book custom view examples [Win7]

2009-12-08 Thread Romi Agar
Aha, it's actually built with SIP v4.9.2.

If I specifically use API#2 QStrings and make the according fixes in the
code, it works fine.
Updating to SIP v4.9.3 also fixes all the bugs I mentioned. Thanks for the
tip Phil.

2009/12/8 Phil Thompson 

> On Tue, 8 Dec 2009 11:48:17 +, Mark Summerfield 
> wrote:
> > 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
> > not
> >> 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...
>
> ...make sure PyQt is built with SIP v4.9.3.
>
> Phil
>
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] python.exe stops responding after closing application

2009-12-28 Thread Romi Agar
Hi

I'm running Win 7 x64, Python 2.6.4rc2, PyQt 4.7-snapshot-20091223 (but the
problem was also with 4.6.2) and SIP 4.10-snapshot-20091223 and I'm having
some trouble using PyQt4 API Version 2.
The application runs fine until I close it. Then python.exe always stops
responding. If I remove the API Ver 2 declarations, the problem does not
occur.
I have attached a simple python script (test.py) that causes the problem on
my machine.

Windows EventViewer reports:
Faulting application name: python.exe, version: 0.0.0.0, time stamp:
0x4adb7dd8
Faulting module name: ntdll.dll, version: 6.1.7600.16385, time stamp:
0x4a5bdb3b
Exception code: 0xc005
Fault offset: 0x0002e29b
Faulting process id: 0x2d8c
Faulting application start time: 0x01ca8809eb77b594
Faulting application path: C:\Python26\python.exe
Faulting module path: C:\Windows\SysWOW64\ntdll.dll
Report Id: 2a1f2e8a-f3fd-11de-93fb-defacedbabe5

I really like the version 2 API, but this crashing of python.exe every time
I close my app is really annoying.

Thanks in advance


test.py
Description: Binary data
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] PyQt multithreaded model/view

2009-12-30 Thread Romi Agar
Hi!

I have a custom table model that gets its data from a QThread reading serial
port data. The serial thread emits data signals that are catched in the main
GUI thread which populates the model with serial data.
When I try to show the data with a QTableView, then the application hangs
because of high data rate.
What should I do that the main application would remain responsive?

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

[PyQt] Previous release windows binaries

2010-01-21 Thread Romi Agar
Hi!

Where could I find the previous PyQt installation binaries (the ones, that
were built with MSVC). I need them to be able to compile Qwt for python.
Because the latest release (PyQt 4.7 is built with mingw) I can't build it
:(

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

[PyQt] PyQt application crashes on exit

2010-04-07 Thread Romi Agar
Hi!

After upgrading my PyQt to version 4.7.2 on my windows 7 x64 machine running
Python 2.6.5 many of my applications tend to crash on exit. Python.exe stops
responding if I close the application window.
A simple example that seems to always crash on my pc is included as an
attachment.

Any ideas about how to fix it?

Thanks  in advance


test.py
Description: Binary data
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt