[PyQt] Strange observation

2013-06-21 Thread Detlev Offenbach
Hello,

there was a strange observation reported using eric5. The eric5 PySvn 
plug-in has a dialog to ask the user for a password. This is embedded in 
code like this

cursor = QApplication.overrideCursor()
if cursor is not None:
QApplication.restoreOverrideCursor()
call the login dialog, could take some time depending upon the user
if cursor is not None:
QApplication.setOverrideCursor(cursor)

Every now and than this code fails with
class 'RuntimeError': 
wrapped C/C++ object of type QCursor has been deleted

What is wrong with my code?

Detlev-- 
*Detlev Offenbach*
det...@die-offenbachs.de
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Strange observation

2013-06-21 Thread Phil Thompson
On Fri, 21 Jun 2013 18:54:15 +0200, Detlev Offenbach
det...@die-offenbachs.de wrote:
 Hello,
 
 there was a strange observation reported using eric5. The eric5 PySvn 
 plug-in has a dialog to ask the user for a password. This is embedded in

 code like this
 
 cursor = QApplication.overrideCursor()
 if cursor is not None:
 QApplication.restoreOverrideCursor()
 call the login dialog, could take some time depending upon the user
 if cursor is not None:
 QApplication.setOverrideCursor(cursor)
 
 Every now and than this code fails with
 class 'RuntimeError': 
 wrapped C/C++ object of type QCursor has been deleted
 
 What is wrong with my code?

Probably...

overrideCursor() returns a pointer to an internal copy of the cursor. This
is deleted by restoreOverrideCursor().

Before calling restoreOverrideCursor() make a copy...

cursor = QCursor(cursor)

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


[PyQt] Strange observation with Qt5/PyQt4

2012-12-30 Thread Detlev Offenbach
Hello,

testing eric5 with Qt5 and latest PyQt4 snapshot raised a strange observation. 
The eric5 Web Browser shows dialog windows generated by Qt5 with content like

Trying to construct an instance of an invalid type, type id: 627995709

Does anybody have an idea what could causing this?

Detlev
-- 
Detlev Offenbach
det...@die-offenbachs.de___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Strange observation with latest stable releases

2010-07-26 Thread detlev
On Sonntag, 25. Juli 2010, Phil Thompson wrote:
 On Sun, 25 Jul 2010 19:11:00 +0200, Antonio Valentino
 
 antonio.valent...@tiscali.it wrote:
  Hi,
  
  Il giorno Sun, 25 Jul 2010 18:26:15 +0200
  
  detlev det...@die-offenbachs.de ha scritto:
  Hi,
  
  in the past code like
  
  @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem)
  
  def on_logTree_currentItemChanged(self, current, previous):
  used to work. Such a method got called, whenever the current item of
  the tree changed. However, with latest stable releases this is not
  the case anymore. If I remove the decorator line, everything is back
  at normal. What is going on here?
  
  Regards,
  Detlev
 
 Should be fixed in tonight's PyQt snapshot.
 
  I'm experimenting similar effects with
  
  @QtCore.pyqtSlot(QtCore.QModelIndex)
  @QtCore.pyqtSlot(QtCore.QModelIndex, int, int)
  @QtCore.pyqtSlot(QtGui.QListWidgetItem, QtGui.QListWidgetItem)
  @QtCore.pyqtSlot(QtGui.QGraphicsScene, QtCore.QPointF,
  
   QtCore.Qt.MouseButtons)
  
  I've still not investigated but by sure by sure after upgrading
  
  sip 4.10  -- 4.10.5
  PyQt4 4.7 -- 4.7.4
  
  the behavior is changed.
 
 The fix is for QListWidgetItem, QTableWidgetItem and QTreeWidgetItem. If
 there are still issues with other classes (eg. QModelIndex) then it's a
 different problem.
 
 Phil
 ___
 PyQt mailing listPyQt@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt

The fix seems to work. Thanks Phil.

Detlev
-- 
Detlev Offenbach
det...@die-offenbachs.de
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[PyQt] Strange observation with latest stable releases

2010-07-25 Thread detlev
Hi,

in the past code like

@pyqtSlot(QTreeWidgetItem, QTreeWidgetItem)
def on_logTree_currentItemChanged(self, current, previous):

used to work. Such a method got called, whenever the current item of the tree 
changed. However, with latest stable releases this is not the case anymore. If 
I remove the decorator line, everything is back at normal. What is going on 
here?

Regards,
Detlev
-- 
Detlev Offenbach
det...@die-offenbachs.de
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Strange observation with latest stable releases

2010-07-25 Thread Antonio Valentino
Hi,

Il giorno Sun, 25 Jul 2010 18:26:15 +0200
detlev det...@die-offenbachs.de ha scritto:

 Hi,
 
 in the past code like
 
 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem)
 def on_logTree_currentItemChanged(self, current, previous):
 
 used to work. Such a method got called, whenever the current item of
 the tree changed. However, with latest stable releases this is not
 the case anymore. If I remove the decorator line, everything is back
 at normal. What is going on here?
 
 Regards,
 Detlev

I'm experimenting similar effects with 

@QtCore.pyqtSlot(QtCore.QModelIndex) 
@QtCore.pyqtSlot(QtCore.QModelIndex, int, int)
@QtCore.pyqtSlot(QtGui.QListWidgetItem, QtGui.QListWidgetItem) 
@QtCore.pyqtSlot(QtGui.QGraphicsScene, QtCore.QPointF,
 QtCore.Qt.MouseButtons)

I've still not investigated but by sure by sure after upgrading

sip 4.10  -- 4.10.5
PyQt4 4.7 -- 4.7.4

the behavior is changed.


Best regards

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


Re: [PyQt] Strange observation with latest stable releases

2010-07-25 Thread Phil Thompson
On Sun, 25 Jul 2010 19:11:00 +0200, Antonio Valentino
antonio.valent...@tiscali.it wrote:
 Hi,
 
 Il giorno Sun, 25 Jul 2010 18:26:15 +0200
 detlev det...@die-offenbachs.de ha scritto:
 
 Hi,
 
 in the past code like
 
 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem)
 def on_logTree_currentItemChanged(self, current, previous):
 
 used to work. Such a method got called, whenever the current item of
 the tree changed. However, with latest stable releases this is not
 the case anymore. If I remove the decorator line, everything is back
 at normal. What is going on here?
 
 Regards,
 Detlev

Should be fixed in tonight's PyQt snapshot.

 I'm experimenting similar effects with 
 
 @QtCore.pyqtSlot(QtCore.QModelIndex) 
 @QtCore.pyqtSlot(QtCore.QModelIndex, int, int)
 @QtCore.pyqtSlot(QtGui.QListWidgetItem, QtGui.QListWidgetItem) 
 @QtCore.pyqtSlot(QtGui.QGraphicsScene, QtCore.QPointF,
  QtCore.Qt.MouseButtons)
 
 I've still not investigated but by sure by sure after upgrading
 
 sip 4.10  -- 4.10.5
 PyQt4 4.7 -- 4.7.4
 
 the behavior is changed.

The fix is for QListWidgetItem, QTableWidgetItem and QTreeWidgetItem. If
there are still issues with other classes (eg. QModelIndex) then it's a
different problem.

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