Re: [PyQt] QModelIndex.internalPointer

2011-05-22 Thread Phil Thompson
On Sun, 22 May 2011 02:23:35 +0200, Hans-Peter Jansen h...@urpla.net
wrote:
 On Wednesday 18 May 2011, 16:03:59 Andrei Kopats wrote:
 Here is example.
 Unfortunately, with it I can reproduce crash only if reference to
 integer was passed to createIndex()

 In the attachment you can find test script, and execution log. The
 log also contains my system info.
 
 Confirmed, and from what I can see, this should not happen.
 Mind converting it to C++, and posting code and results here, just to 
 exclude an Qt issue?

It's working as intended. If you pass an int then it is assumed that this
is a memory address, otherwise it is assumed to be a borrowed reference to
a Python object.

If you want an int to be interpreted differently then wrap it in a class.

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


[PyQt] ANN: SIP v4.12.3 Released

2011-05-22 Thread Phil Thompson
SIP v4.12.3 has been released. This is a minor bug fix release.

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


Re: [PyQt] QModelIndex.internalPointer

2011-05-22 Thread Hans-Peter Jansen
On Sunday 22 May 2011, 11:42:38 Phil Thompson wrote:
 On Sun, 22 May 2011 02:23:35 +0200, Hans-Peter Jansen
 h...@urpla.net

 wrote:
  On Wednesday 18 May 2011, 16:03:59 Andrei Kopats wrote:
  Here is example.
  Unfortunately, with it I can reproduce crash only if reference to
  integer was passed to createIndex()
 
  In the attachment you can find test script, and execution log. The
  log also contains my system info.
 
  Confirmed, and from what I can see, this should not happen.
  Mind converting it to C++, and posting code and results here, just
  to exclude an Qt issue?

 It's working as intended. If you pass an int then it is assumed that
 this is a memory address, otherwise it is assumed to be a borrowed
 reference to a Python object.

 If you want an int to be interpreted differently then wrap it in a
 class.

Okay, that makes sense. Thanks for the clarification.

I would have supplied a doc patch for this matter, but couldn't locate 
the doc source. Guess, it is generated from the Qt docs directly..

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


Re: [PyQt] FW: cascadeSubWindows oversized

2011-05-22 Thread David Boddie
On Sat, 21 May 2011 11:41:43 +, Pietro Moras wrote:

 Let me ask this same question this other way:
    Is there a method to reset the size of all MDI SubWindows so that to fit
 them at once exactly on the space available on the host MDI window? Thanks!

Would tileSubWindows() do what you want?

http://www.riverbankcomputing.com/static/Docs/PyQt4/html/qmdiarea.html#tileSubWindows

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