Re: [PyQt] Performance deterioration when using integer spin boxes PS ...

2010-09-24 Thread Preisig, Heinz A
OK, problem has been removed, though I do not know what the problem was. 
The issue was that MatPlotLib did not go together with the rest and 
simply got the whole program to a stand-still. I have not had the time 
to check what really was the problem, but it seemed obvious that a long 
queue of events is somewhere in the background generated.


Exchanging the plotting with a PyQwt implementation that is a little 
less luxurious, the problem disappeared. Performance was actually 
significantly improved also when not using any other event-driven parts 
of the interface. Thus looks like PyQwt is recommendable.


Heinz Preisig

On 09/22/2010 05:06 PM, Preisig, Heinz A wrote:
PS: playing more it is not only the spin box. Other actions taken on 
the interface slow it down too. Thus it is not a problem with the spin 
boxes, but must be more generic. Only noticed the problem there first.


On 09/22/2010 04:48 PM, Preisig, Heinz A wrote:

Certainly:

I am using a timer to generate time events. On each time event I am 
doing a computation, in this case a data acquisition (DA converter) 
and then a computation the result of which is sent to a DA converter. 
The interface has a couple of spin boxes and sliders and buttons to 
manipulate what is happening. In the application I am using now, I 
replaced the process interface, which actually goes and receives and 
sends data to a serial port, by a simple simulation, which 
essentially does nothing.


What I observe is that when the task executes nicely in the time grid 
(1 s). Once I am changing things in a spin box, the task does not 
make it to catch the next time event and it keeps on slowing down the 
more I am manipulating. I presume there are lots of events being 
generated in the background or passed on to other levels.


I should mention that this is not the first application of this type. 
We wrote one last year and it worked just fine. We used it 
extensively at the time on very slow machines. The one I am working 
on now is a much faster machine and it runs the newer version of 
python and pyqt. On the slow one it gets bugged down tremendously.


Not sure what the problem is

Heinz

On 09/22/2010 04:04 PM, Hans-Peter Jansen wrote:

On Wednesday 22 September 2010, 15:45:15 Preisig, Heinz A wrote:
   

I observed that when using integer spin boxes in a timed loop the
performance drops significantly after changing a value.
 

Heinz, could you elaborate on using integer spin boxes in a timed loop a
bit, please? I don't grasp the concept of it ATM.

Pete

   

After dxchanging
them by double spin boxes no deterioration was observed.

Heinz Preisig
___
PyQt mailing listp...@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
 

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


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no 
mailto:heinz.prei...@chemeng.ntnu.no
web: www.chemeng.ntnu.no\~preisig 
http://www.chemeng.ntnu.no/%7Epreisig




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


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no 
mailto:heinz.prei...@chemeng.ntnu.no

web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig



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


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no mailto:heinz.prei...@chemeng.ntnu.no
web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig


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

[PyQt] Performance deterioration when using integer spin boxes

2010-09-22 Thread Preisig, Heinz A
I observed that when using integer spin boxes in a timed loop the 
performance drops significantly after changing a value. After dxchanging 
them by double spin boxes no deterioration was observed.


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


Re: [PyQt] Performance deterioration when using integer spin boxes

2010-09-22 Thread Preisig, Heinz A

Certainly:

I am using a timer to generate time events. On each time event I am 
doing a computation, in this case a data acquisition (DA converter) and 
then a computation the result of which is sent to a DA converter. The 
interface has a couple of spin boxes and sliders and buttons to 
manipulate what is happening. In the application I am using now, I 
replaced the process interface, which actually goes and receives and 
sends data to a serial port, by a simple simulation, which essentially 
does nothing.


What I observe is that when the task executes nicely in the time grid (1 
s). Once I am changing things in a spin box, the task does not make it 
to catch the next time event and it keeps on slowing down the more I am 
manipulating. I presume there are lots of events being generated in the 
background or passed on to other levels.


I should mention that this is not the first application of this type. We 
wrote one last year and it worked just fine. We used it extensively at 
the time on very slow machines. The one I am working on now is a much 
faster machine and it runs the newer version of python and pyqt. On the 
slow one it gets bugged down tremendously.


Not sure what the problem is

Heinz

On 09/22/2010 04:04 PM, Hans-Peter Jansen wrote:

On Wednesday 22 September 2010, 15:45:15 Preisig, Heinz A wrote:
   

I observed that when using integer spin boxes in a timed loop the
performance drops significantly after changing a value.
 

Heinz, could you elaborate on using integer spin boxes in a timed loop a
bit, please? I don't grasp the concept of it ATM.

Pete

   

After dxchanging
them by double spin boxes no deterioration was observed.

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


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


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no mailto:heinz.prei...@chemeng.ntnu.no
web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig


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

Re: [PyQt] Performance deterioration when using integer spin boxes PS ...

2010-09-22 Thread Preisig, Heinz A
PS: playing more it is not only the spin box. Other actions taken on the 
interface slow it down too. Thus it is not a problem with the spin 
boxes, but must be more generic. Only noticed the problem there first.


On 09/22/2010 04:48 PM, Preisig, Heinz A wrote:

Certainly:

I am using a timer to generate time events. On each time event I am 
doing a computation, in this case a data acquisition (DA converter) 
and then a computation the result of which is sent to a DA converter. 
The interface has a couple of spin boxes and sliders and buttons to 
manipulate what is happening. In the application I am using now, I 
replaced the process interface, which actually goes and receives and 
sends data to a serial port, by a simple simulation, which essentially 
does nothing.


What I observe is that when the task executes nicely in the time grid 
(1 s). Once I am changing things in a spin box, the task does not make 
it to catch the next time event and it keeps on slowing down the more 
I am manipulating. I presume there are lots of events being generated 
in the background or passed on to other levels.


I should mention that this is not the first application of this type. 
We wrote one last year and it worked just fine. We used it extensively 
at the time on very slow machines. The one I am working on now is a 
much faster machine and it runs the newer version of python and pyqt. 
On the slow one it gets bugged down tremendously.


Not sure what the problem is

Heinz

On 09/22/2010 04:04 PM, Hans-Peter Jansen wrote:

On Wednesday 22 September 2010, 15:45:15 Preisig, Heinz A wrote:
   

I observed that when using integer spin boxes in a timed loop the
performance drops significantly after changing a value.
 

Heinz, could you elaborate on using integer spin boxes in a timed loop a
bit, please? I don't grasp the concept of it ATM.

Pete

   

After dxchanging
them by double spin boxes no deterioration was observed.

Heinz Preisig
___
PyQt mailing listp...@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
 

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


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no 
mailto:heinz.prei...@chemeng.ntnu.no

web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig



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


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no mailto:heinz.prei...@chemeng.ntnu.no
web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig


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

Re: [PyQt] upgrade to ubuntu 10.04 -- problem with graphics (solved)

2010-09-09 Thread Preisig, Heinz A

Seems the problem is solved for now.

I searched for a couple of days and came to no conclusion. The task 
crashed after having left itemChange in the next execution call. As 
mentioned running it in the debugger inside Eclipse did not result any 
error message. Running it from the terminal it gave segmentation fault.


One problem disappeared when setting the flag ItemSendsGeometryChanges 
as David suggested. Then I could move the objects again. However it 
crashed on another operation. Again the segmentation fault. Comparing my 
rather old code with the elasticnode example code I found that I had not 
set the index method (setItemIndexMethod) to NoIndex. Adding the flag, 
did the trick.


Maybe this was a default before?

Heinz

PS I attach the modified code of the elasticnodes example. Not sure 
anymore where I took it from, but if I am not mistaken from the 
riverbankcomputing domain.


On 09/05/2010 08:32 AM, Preisig, Heinz A wrote:
Thanks for the help. I shall modify the code and look at the example 
too. I also decided to re-install. Shall report on results.


Cheers,
Heinz

On 09/04/2010 03:30 PM, David Boddie wrote:

On Sat Sep 4 08:00:06 BST 2010, Preisig, Heinz A wrote:

   

After upgrading Ubuntu 9.10 to 10.04 I encounter some problems with
running a graphics application I built last year. It uses the mechanisms
described in the example elasticnodes. The two application represent a
graph, which when moving the nodes also update the location of the arcs.

In both cases the arcs are not updated. In fact the example does not
show the arcs when starting it. My application does show the arcs, but
it does not update. I dug for some hours in the code, but could not find
a problem. It seems it does not get into the itemChange method of the
QGraphicsItem class. Some manipulations resulted in abortion of the
task, which when running from within Eclipse did not produce an error
message. From the terminal I got an occasional segmentation fault.
 

I don't know why you are getting segmentation faults, but the problem with
the itemChange method is due to a change in behaviour in Qt 4.6. You now
need to call the item's setFlag method with the ItemSendsGeometryChanges
flag to get notifications when items move.

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


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no 
mailto:heinz.prei...@chemeng.ntnu.no

web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig



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


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no mailto:heinz.prei...@chemeng.ntnu.no
web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig


#!/usr/bin/env python

#
##
## Copyright (C) 2006-2006 Trolltech ASA. All rights reserved.
##
## This file is part of the example classes of the Qt Toolkit.
##
## Licensees holding a valid Qt License Agreement may use this file in
## accordance with the rights, responsibilities and obligations
## contained therein.  Please consult your licensing agreement or
## contact sa...@trolltech.com if any conditions of this licensing
## agreement are not clear to you.
##
## Further information about Qt licensing is available at:
## http://www.trolltech.com/products/qt/licensing.html or by
## contacting i...@trolltech.com.
##
## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
##
#

import sys
import math
from PyQt4 import QtCore, QtGui


class Edge(QtGui.QGraphicsItem):
Pi = math.pi
TwoPi = 2.0 * Pi

Type = QtGui.QGraphicsItem.UserType + 2

def __init__(self, sourceNode, destNode):
QtGui.QGraphicsItem.__init__(self)

self.arrowSize = 10.0
self.sourcePoint = QtCore.QPointF()
self.destPoint = QtCore.QPointF()
self.setAcceptedMouseButtons(QtCore.Qt.NoButton)
self.source = sourceNode
self.dest = destNode
self.source.addEdge(self)
self.dest.addEdge(self)
self.adjust()

def type(self):
return

Re: [PyQt] upgrade to ubuntu 10.04 -- problem with graphics

2010-09-05 Thread Preisig, Heinz A
Thanks for the help. I shall modify the code and look at the example 
too. I also decided to re-install. Shall report on results.


Cheers,
Heinz

On 09/04/2010 03:30 PM, David Boddie wrote:

On Sat Sep 4 08:00:06 BST 2010, Preisig, Heinz A wrote:

   

After upgrading Ubuntu 9.10 to 10.04 I encounter some problems with
running a graphics application I built last year. It uses the mechanisms
described in the example elasticnodes. The two application represent a
graph, which when moving the nodes also update the location of the arcs.

In both cases the arcs are not updated. In fact the example does not
show the arcs when starting it. My application does show the arcs, but
it does not update. I dug for some hours in the code, but could not find
a problem. It seems it does not get into the itemChange method of the
QGraphicsItem class. Some manipulations resulted in abortion of the
task, which when running from within Eclipse did not produce an error
message. From the terminal I got an occasional segmentation fault.
 

I don't know why you are getting segmentation faults, but the problem with
the itemChange method is due to a change in behaviour in Qt 4.6. You now
need to call the item's setFlag method with the ItemSendsGeometryChanges
flag to get notifications when items move.

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


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no mailto:heinz.prei...@chemeng.ntnu.no
web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig


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

[PyQt] upgrade to ubuntu 10.04 -- problem with graphics

2010-09-04 Thread Preisig, Heinz A
After upgrading Ubuntu 9.10 to 10.04 I encounter some problems with 
running a graphics application I built last year. It uses the mechanisms 
described in the example elasticnodes. The two application represent a 
graph, which when moving the nodes also update the location of the arcs.


In both cases the arcs are not updated. In fact the example does not 
show the arcs when starting it. My application does show the arcs, but 
it does not update. I dug for some hours in the code, but could not find 
a problem. It seems it does not get into the itemChange method of the 
QGraphicsItem class. Some manipulations resulted in abortion of the 
task, which when running from within Eclipse did not produce an error 
message. From the terminal I got an occasional segmentation fault.


Has somebody experienced similar problems?

I should mention that I upgraded Ubuntu and did not do a clean 
re-install just as yet. I guess that would be the next step.


Heinz Preisig

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


[PyQt] [wizard] done, accept, reject

2010-08-12 Thread Preisig, Heinz A
I am running into problems controlling the exit from the wizard. Tried 
several things but seem not to find a solution. Probably overlook 
something...?


The code, attached below is executed on ubuntu 10.04 and I also tried on 
kubuntu.


The problem is with done and reject. The task does not exit, but 
persists. I have to kill the process.
When eliminating done and reject, the task exits cleanly on finish and 
cancel.


If I add the statement
return 1
to done, I get an error message on the type being returned.

Does somebody have an idea what is wrong?

Thanks,

Heinz Preisig

code:  attached


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no mailto:heinz.prei...@chemeng.ntnu.no
web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig


#!./bin/python
'''
Created on May 10, 2010

@author: heinz
'''




import sys
from PyQt4 import QtGui, QtCore
from wizard_ui_impl import Ui_WizardImpl

a = QtGui.QApplication(sys.argv)

w = Ui_WizardImpl()
w.show()
#TODO: close all windows on exit
r = a.exec_()
print 'finishing', r

wizard.ui
Description: application/designer
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on Aug 9, 2010

@author: heinz
'''



from PyQt4 import QtGui
from PyQt4 import QtCore
from wizard_ui import Ui_Wizard


class Ui_WizardImpl(QtGui.QWizard):
'''
classdocs
'''


def __init__(self, *args):
QtGui.QWizard.__init__(self)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.ui = Ui_Wizard()
self.ui.setupUi(self)

def cleanupPage(self,int):
print 'clean up page'

def done(self, int):
print 'done'
self.close()
return self


def accept(self):
print 'accepted'
self.close()

#def reject(self):
#print 'reject'
#self.__exit()


# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'wizard.ui'
#
# Created: Thu Aug 12 10:39:21 2010
#  by: PyQt4 UI code generator 4.7.2
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

class Ui_Wizard(object):
def setupUi(self, Wizard):
Wizard.setObjectName(Wizard)
Wizard.resize(400, 300)
self.wizardPage1 = QtGui.QWizardPage()
self.wizardPage1.setObjectName(wizardPage1)
Wizard.addPage(self.wizardPage1)
self.wizardPage2 = QtGui.QWizardPage()
self.wizardPage2.setObjectName(wizardPage2)
Wizard.addPage(self.wizardPage2)

self.retranslateUi(Wizard)
QtCore.QMetaObject.connectSlotsByName(Wizard)

def retranslateUi(self, Wizard):
Wizard.setWindowTitle(QtGui.QApplication.translate(Wizard, Wizard, None, QtGui.QApplication.UnicodeUTF8))

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

[PyQt] Fwd: Re: [wizard] done, accept, reject

2010-08-12 Thread Preisig, Heinz A


Hi Colin,

thanks that does indeed work.

I thought though I essentially tried it with

   QtGui.QWizard(self).done(r)

but that did not work.

Cheers, Heinz

On 08/12/2010 01:55 PM, Colin McPhail wrote:

 super(Ui_WizardImpl, self).done(r)
   


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no mailto:heinz.prei...@chemeng.ntnu.no
web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig


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

Re: [PyQt] Fwd: Re: [wizard] done, accept, reject

2010-08-12 Thread Preisig, Heinz A
Sure, was reading a part of the manual that was in C/C++. You are 
certainly correct.


Could not see it.

Thanks, Heinz



On 08/12/2010 04:10 PM, Sybren A. Stüvel wrote:

On 12-8-2010 15:30, Preisig, Heinz A wrote:
   

I thought though I essentially tried it with

QtGui.QWizard(self).done(r)
 

You can't use C-style casting in Python. What QtGui.QWizard(self) does
is create a new QWizard with self as the parent. It then proceeds to
call done(r) on that new QWizard instance. Then the instance is cobbled
up by the garbage collector.

I think what you want is to call the unbound method:

   QtGui.QWizard.done(self, r)

Cheers,
Sybren
   


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no mailto:heinz.prei...@chemeng.ntnu.no
web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig


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

Re: [PyQt] Fwd: Re: [wizard] done, accept, reject one more time for the records

2010-08-12 Thread Preisig, Heinz A

PS:

I just checked and found that I also tried:

def done(self):
...
QtGui.QWizard.close(self)

and that did not work either.

Regards, Heinz

On 08/12/2010 04:10 PM, Sybren A. Stüvel wrote:

On 12-8-2010 15:30, Preisig, Heinz A wrote:
   

I thought though I essentially tried it with

QtGui.QWizard(self).done(r)
 

You can't use C-style casting in Python. What QtGui.QWizard(self) does
is create a new QWizard with self as the parent. It then proceeds to
call done(r) on that new QWizard instance. Then the instance is cobbled
up by the garbage collector.

I think what you want is to call the unbound method:

   QtGui.QWizard.done(self, r)

Cheers,
Sybren
   


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: heinz.prei...@chemeng.ntnu.no mailto:heinz.prei...@chemeng.ntnu.no
web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig


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

[PyQt] Not implemented error

2008-09-08 Thread Preisig, Heinz

Hi,

is there a way to get rid of the error
NotImplementedError: QGraphicsItem.paint() is abstract and must be 
overridden


Thanks
Heinz Preisig

begin:vcard
fn:Preisig, Heinz A
n:Preisig;Heinz A
org:NTNU;Chemical Engineering
adr;quoted-printable:;;Sem S=C3=A6landsvei 4 (Kjemiblokk 5);Trondheim;;7491;Norway
email;internet:[EMAIL PROTECTED]
title:Professor of Process Systems Engineering
tel;work:+47  735 92807
tel;cell:+47  97.54.13.34
note;quoted-printable:Private:=0D=0A=
	Oevre Bakklandet 62 B=0D=0A=
	7013 Trondheim=0D=0A=
	Norway
url:www.chemeng.ntnu.no\~preisig
version:2.1
end:vcard

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

Re: [PyQt] windows installer

2008-07-15 Thread Preisig, Heinz
The problem was that python did not know where the libraries were. Can 
this be automated on the installer?


Cheers,
Heinz Preisig

Heinz A. Preisig wrote:

Hi I got a new machine and installed

1. python 2.5
2. PyQt *Py2.5-gpl-4.4.2-1

running an application I get the error message name start point for procedure 
could not be found in dynamic link library QtCore4.dll(translation from 
Norwegian...may not be precise)


What do I miss?

Regards,

Heinz Preisig
--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology  
N – 7491 Trondheim, Norway 	Tel direct: +47 735 92807

Tel mob:   +47 9754 1334
e-mail:  [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]
web: www.chemeng.ntnu.no\~preisig 
http://www.chemeng.ntnu.no/%7Epreisig


 
  



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


--


Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N – 7491 Trondheim, Norway  Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
web: www.chemeng.ntnu.no\~preisig http://www.chemeng.ntnu.no/%7Epreisig


begin:vcard
fn:Preisig, Heinz A
n:Preisig;Heinz A
org:NTNU;Chemical Engineering
adr;quoted-printable:;;Sem S=C3=A6landsvei 4 (Kjemiblokk 5);Trondheim;;7491;Norway
email;internet:[EMAIL PROTECTED]
title:Professor of Process Systems Engineering
tel;work:+47  735 92807
tel;cell:+47  97.54.13.34
note;quoted-printable:Private:=0D=0A=
	Oevre Bakklandet 62 B=0D=0A=
	7013 Trondheim=0D=0A=
	Norway
url:www.chemeng.ntnu.no\~preisig
version:2.1
end:vcard

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

Re: [PyQt] msvcp71.dll

2007-09-03 Thread Preisig, Heinz A
First time around it is a little tricky to find out what is going wrong 
when the dll is missing. It may not be trivial for everybody to find 
out. Could either be included or mentioned in an installation description.


- Heinz Preisig

Giovanni Bajo wrote:

On 9/3/2007 12:23 PM, Phil Thompson wrote:


I've just tried out the latest pyqt4 installer for windows, and found
that nothing would run because msvcp71.dll was missing. Would it be
sensible to include this in the package, or is this something whose
installation should be sorted out by the user?


Isn't it needed by Python anyway?


Not really, since it's the C++ runtime library.

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


Re: [PyQt] ANN: PyQt v4.3, PyQt v3.17.3, SIP v4.7 Released

2007-07-31 Thread Preisig, Heinz A
Hmmm, having installed the new version, the graphics items suddenly 
moved twice as fast over the screen. Adjusting the move-event handler 
fixed the problem. But there are more things (at least in the graphview 
- group) that seem to have changed their behaviour.

Do we all know that?

Cheers, Heinz

Phil Thompson wrote:
PyQt v4.3, PyQt v3.17.3 and SIP v4.7 have been released and are available from 
the usual places.


PyQt v4.3 supports Qt v4.3.0, the pickling of many Qt classes and enums, and 
the use of partial functions as slots. See the NEWS file for the details. SIP 
v4.7 is required.


PyQt v3.17.3 is a minor bug fix release. Previous versions will not build with 
SIP v4.7.


SIP v4.7 supports composite and consolidated modules, and the new %PickleCode 
directive. See the NEWS file for the details.


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

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


[PyQt] Difficulties with debugging

2007-07-23 Thread Preisig, Heinz A

Hi,
I have been porting an editor that is strongly graphics based to the new 
version. Thought it would be useful to reflect some of the problems I 
had with  the conversion. Firstly there were a large number of small 
changes. Mostly renaming due to the changes made by the Trolltech 
people. Lots of the new names seemed quite unnecessary at a first glance 
at least.
The main problem though is that the debugging is difficult as python is 
blowing frequently. Seems that there are some memory issues, which are 
difficult to identify from the surface. Problems seem to focus on 
graphview and graphitems. Not quite sure on how to approach the problem.


I am using Eclipse + PyDev as a developing environment.

Heinz Preisig




Heinz A Preisig
Professor of Process Systems EngineeringPrivate:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology  
N -- 7491 Trondheim, Norway 	Tel direct: +47 735 92807

Tel mob:   +47 9754 1334
e-mail:  [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]
web: www.chemeng.ntnu.no\~preisig 
http://www.chemeng.ntnu.no/%7Epreisig



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