[PyQt] cascadeSubWindows oversized

2011-05-19 Thread Pietro Moras

Dear Sir,
   In debugging an existing application based on PyQt4 (4.8.3), while 
“.tileSubWindows” method works ok, with all sub-windows correctly dimensioned 
to fit into the host window, the “.cascadeSubWindows” generates child windows 
by far too large for the available room.


(?) Any idea what / where to look, so to fix this odd behaviour? 


Plus, I must confess that documentation I've got so far: 
-- PyQt 4.8.3 Reference Guide and Class Reference
-- M. Summerfield “Rapid GUI Programming with Python and Qt”
resulted of very little help, so far. My fault, probably...
Thanks.
- P.M.___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Debugging in windows

2011-05-19 Thread Mailing List SVR


Il giorno dom, 15/05/2011 alle 00.22 -0400, Luke Campagnola ha scritto:
> Howdy,
> I have just compiled PyQt 4.8.4 in WinXP using MinGW from the Qt SDK.
> I configured both sip and PyQt with --debug turned on (but had to
> modify the makefiles to link against python26 instead of python26_d).
> My problem right now is that these did not produce importable modules
> (for instance, I have QtCore_d.pyd installed instead of QtCore.pyd).
> If I recompile without the debug flag, everything works fine (but I
> get no debugging symbols via GDB). 
> 
> 
> Am I missing something obvious here? 
> Are there perhaps any hand-holding documents describing how to get
> debuggable pyqt on windows?

I guess such document would be really useful for most people ... I'm
unable to debug pyqt app on windows too 

> 
> 
> Luke
> ___
> 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] Subclass of QGraphicsObject does not have the correct class name listed in QGraphicsScene.items()

2011-05-19 Thread Selim Tuvi

The code below outputs:

[<__main__.Edge object at 0x2aaab0395830>, object at 0x2aaab03958c0>]


which lists the Node instance as having the class QGraphicsItem when it 
should say <__main__.Node object at ...>.


Tested on (Qt 4.7.2, PyQt 4.8.3) and (Qt 4.6.1, PyQt 4.7.2)

Thanks
-Selim

from PyQt4 import QtGui, QtCore

class Node(QtGui.QGraphicsObject):
   def __init__(self):
   QtGui.QGraphicsObject.__init__(self)
  
   def paint(self, painter, option, widget):

   pass
  
   def boundingRect(self):

   return QtCore.QRectF()

class Edge(QtGui.QGraphicsItem):
   def __init__(self):
   QtGui.QGraphicsItem.__init__(self)

   def paint(self, painter, option, widget):
   pass

   def boundingRect(self):
   return QtCore.QRectF()

if __name__ == '__main__':
   import sys
   app = QtGui.QApplication(sys.argv)
   print QtCore.QT_VERSION_STR, QtCore.PYQT_VERSION_STR
   view = QtGui.QGraphicsView()
   scene = QtGui.QGraphicsScene()
   view.setScene(scene)
   scene.addItem(Node())
   scene.addItem(Edge())
   print scene.items()
   view.show()
   sys.exit(app.exec_())

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

[PyQt] Reasign event

2011-05-19 Thread Hugo Léveillé
Newbie in using event in pyqt

Let say I just want a keyPressEvent to happen with a certain QLineEdit

I tried :

self.myLineEDit.keyPressEvent = self.myEvent

def myEvent(self,event):
print "Hello world"

Sure enought its working. Now it only print hello world when I am typing
in that line edit. But the problem is that the text I am typing does not
appear in the line edit. Only the printing of "Hello world" happend

What am I missing ?


-- 
  Hugo Léveillé
  TD Compositing, Vision Globale
  hu...@fastmail.net

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


Re: [PyQt] Reasign event

2011-05-19 Thread Hans-Peter Jansen
On Friday 20 May 2011, 00:12:14 Hugo Léveillé wrote:
> Newbie in using event in pyqt
>
> Let say I just want a keyPressEvent to happen with a certain
> QLineEdit
>
> I tried :
>
> self.myLineEDit.keyPressEvent = self.myEvent
>
> def myEvent(self,event):
> print "Hello world"
>
> Sure enought its working. Now it only print hello world when I am
> typing in that line edit. But the problem is that the text I am
> typing does not appear in the line edit. Only the printing of "Hello
> world" happend
>
> What am I missing ?

Calling the base class. You're disrupting the event handler chain.

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


Re: [PyQt] Reasign event

2011-05-19 Thread Hugo Leveille
Ok

So for my exemple,what would be the correct syntax


thanks alot


--
Hugo Leveille
Compositing TD
Vision Globale
hu...@fastmail.net

Sent from my iPhone

On May 19, 2011, at 7:30 PM, "Hans-Peter Jansen"  wrote:

> On Friday 20 May 2011, 00:12:14 Hugo Léveillé wrote:
>> Newbie in using event in pyqt
>> 
>> Let say I just want a keyPressEvent to happen with a certain
>> QLineEdit
>> 
>> I tried :
>> 
>> self.myLineEDit.keyPressEvent = self.myEvent
>> 
>> def myEvent(self,event):
>>print "Hello world"
>> 
>> Sure enought its working. Now it only print hello world when I am
>> typing in that line edit. But the problem is that the text I am
>> typing does not appear in the line edit. Only the printing of "Hello
>> world" happend
>> 
>> What am I missing ?
> 
> Calling the base class. You're disrupting the event handler chain.
> 
> Pete
> ___
> PyQt mailing listPyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt