[PyQt] Unable to create the C++ code

2009-04-29 Thread Gudjon I. Gudjonsson
Hi
   I am trying to fix the Debian package of PyQwt5 where I get the error:
Generating the C++ source for the qt module...
sip: QApplication has ctors with the same Python signature
Error: Unable to create the C++ code.


I do in fact get the same error when I try to compile the PyQt3-3.17.4
sources but PyQt3-3.17.6 compiles without problems.

I tried to take a look at the difference between these sources but did not
become any wiser. If someone could point out the relevant difference, the
same solution might be applicable to PyQwt5.

The sip version is 4.7.9.

Thanks
Gudjon

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


Re: [PyQt] multiple QThread simultaneously

2009-04-29 Thread Demetrius Cassidy

I don't see why there would be a limit. Can you post a sample code?


NARCISO, Rui wrote:
> 
> 
> Hi all,
> 
> I have a class MyThread that inherits from QThread and I would like to be
> able to run multiple instances of MyThread in parallel (even if one has to
> wait while the other completes).
> 
> I have tried with a simple instanciation of MyThread, connecting to a
> signal I emit within MyThread and then starting it...
> 
> The problem I have is that if I start a newly created MyThread I get an
> error from the previous one (I think) when I try to emit my signal ...
> 
> Why is this happening ? Can I not have serveral instances of the same
> thread running at the same time ?
> 
> Thanks
> 
> Rui
> 
> 
> The information in this e-mail is confidential. The contents may not be
> disclosed or used by anyone other then the addressee. Access to this
> e-mail by anyone else is unauthorised.
> If you are not the intended recipient, please notify Airbus immediately
> and delete this e-mail.
> Airbus cannot accept any responsibility for the accuracy or completeness
> of this e-mail as it has been sent over public networks. If you have any
> concerns over the content of this message or its Accuracy or Integrity,
> please contact Airbus immediately.
> All outgoing e-mails from Airbus are checked using regularly updated virus
> scanning software but you should take whatever measures you deem to be
> appropriate to ensure that this message and any attachments are virus
> free.
> 
> 
> ___
> PyQt mailing listPyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> 

-- 
View this message in context: 
http://www.nabble.com/multiple-QThread-simultaneously-tp23277099p23302402.html
Sent from the PyQt mailing list archive at Nabble.com.

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


[PyQt] Problem with latest PyQt build - ImportError: DLL load failed: Invalid access to memory location.

2009-04-29 Thread Demetrius Cassidy

>>> from PyQt4 import QtCore
Traceback (most recent call last):
  File "", line 1, in 
ImportError: DLL load failed: Invalid access to memory location.

If I use the nightly build from 4252009, it all works as intended.

Using Qt 4.51 with the included mingw32 to build PyQt. It builds fine and
theres no errors, but Python fails to import the *.pyd files.
-- 
View this message in context: 
http://www.nabble.com/Problem-with-latest-PyQt-build---ImportError%3A-DLL-load-failed%3A-Invalid-access-to-memory-location.-tp23302281p23302281.html
Sent from the PyQt mailing list archive at Nabble.com.

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


Re: [PyQt] Why does QApplication.processEvents() increase performance?

2009-04-29 Thread Fabrizio Milo aka misto
My Guess is that the time is spent on creating large object events
queues that then get processed all at once.
In the second approach the queues are smaller and the object could be
reused without being created again.

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


Re: [PyQt] Help with New qtdemo Example

2009-04-29 Thread Phil Thompson
On Wed, 29 Apr 2009 21:57:23 +0800, grissiom 
wrote:
>> 在 星期三 29 四月 2009 05:34:05,Phil Thompson 写道:
>> > I've made sure that everything in the info dict (read from the XML
>> > file)
>> > is a Python string rather than a QString. That should fix all similar
>> > problems.
>> >
>> > Most things seem to work in tonight's snapshot...
>> >
>> > - Not all of the animations work properly - right click on the
>> > animation
>> > to move to the next one. You can compare them with the C++ version.
>> >
>> > - Qt Assistant freezes when you press the Documentation button.
>> >
>> > Phil
> 
> Excellent Phil~ After this patch(against snapshot-0428), the demo is
> perfect

Except for the broken animations - which I've now fixed.

> except the Assistant issue...

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


Re: [PyQt] Help with New qtdemo Example

2009-04-29 Thread grissiom
> 在 星期三 29 四月 2009 05:34:05,Phil Thompson 写道:
> > I've made sure that everything in the info dict (read from the XML file)
> > is a Python string rather than a QString. That should fix all similar
> > problems.
> >
> > Most things seem to work in tonight's snapshot...
> >
> > - Not all of the animations work properly - right click on the animation
> > to move to the next one. You can compare them with the C++ version.
> >
> > - Qt Assistant freezes when you press the Documentation button.
> >
> > Phil

Excellent Phil~ After this patch(against snapshot-0428), the demo is perfect 
except the Assistant issue...

Cheers,
Grissiom
diff -ur 0428/qtdemo/colors.py work/demos/qtdemo/colors.py
--- 0428/qtdemo/colors.py	2009-04-29 10:41:23.0 +0800
+++ work/demos/qtdemo/colors.py	2009-04-29 21:41:11.0 +0800
@@ -122,6 +122,7 @@
 @classmethod
 def debug(cls, *args):
 if cls.verbose:
+args = [str(x) for x in args]
 sys.stderr.write("%s\n" % " ".join(args))
 
 @classmethod
diff -ur 0428/qtdemo/demotextitem.py work/demos/qtdemo/demotextitem.py
--- 0428/qtdemo/demotextitem.py	2009-04-29 10:41:23.0 +0800
+++ work/demos/qtdemo/demotextitem.py	2009-04-28 21:47:23.0 +0800
@@ -1,4 +1,4 @@
-from PyQt4 import QtGui
+from PyQt4 import QtGui, QtCore
 
 from demoitem import DemoItem
 
diff -ur 0428/qtdemo/examplecontent.py work/demos/qtdemo/examplecontent.py
--- 0428/qtdemo/examplecontent.py	2009-04-29 10:41:23.0 +0800
+++ work/demos/qtdemo/examplecontent.py	2009-04-29 21:23:38.0 +0800
@@ -42,7 +42,8 @@
 
 paragraphs = exampleDoc.elementsByTagName('p')
 if paragraphs.length() < 1:
-Colors.debug("- ExampleContent::loadDescription(): Could not load description:", self._menu_manager.info[self.name]['docfile'])
+Colors.debug("- ExampleContent::loadDescription(): Could not load description:",
+self._menu_manager.info[self.name].get('docfile'))
 
 description = Colors.contentColor + "Could not load description. Ensure that the documentation for Qt is built."
 for p in range(paragraphs.length()):
diff -ur 0428/qtdemo/menumanager.py work/demos/qtdemo/menumanager.py
--- 0428/qtdemo/menumanager.py	2009-04-29 10:41:23.0 +0800
+++ work/demos/qtdemo/menumanager.py	2009-04-29 21:39:41.0 +0800
@@ -190,7 +190,7 @@
 self.score.queueMovie('ticker -out', Score.NEW_ANIMATION_ONLY)
 elif userCode == MenuManager.UP:
 backMenu = self.info[self.currentMenu]['back']
-if backMenu != '':
+if backMenu:
 self.score.queueMovie(self.currentMenu + ' -top_out',
 Score.FROM_START, Score.LOCK_ITEMS)
 self.score.queueMovie(backMenu + ' -bottom_in',
@@ -198,7 +198,7 @@
 self.currentMenu = backMenu
 elif userCode == MenuManager.DOWN:
 moreMenu = self.info[self.currentMenu]['more']
-if moreMenu != '':
+if moreMenu:
 self.score.queueMovie(self.currentMenu + ' -bottom_out',
 Score.FROM_START, Score.LOCK_ITEMS)
 self.score.queueMovie(moreMenu + ' -top_in', Score.FROM_START,
@@ -233,15 +233,18 @@
 self.itemSelected(MenuManager.ROOT, Colors.rootMenuName)
 
 # Update back and more buttons.
-if self.info.setdefault(self.currentMenu, {}).get('back'):
-back_state = TextButton.OFF
+if not self.currentMenu in self.info.keys():
+back_state, more_state = TextButton.DISABLED, TextButton.DISABLED
 else:
-back_state = TextButton.DISABLED
+if self.info[self.currentMenu].get('back'):
+back_state = TextButton.OFF
+else:
+back_state = TextButton.DISABLED
 
-if self.info[self.currentMenu].get('more'):
-more_state = TextButton.OFF
-else:
-more_state = TextButton.DISABLED
+if self.info[self.currentMenu].get('more'):
+more_state = TextButton.OFF
+else:
+more_state = TextButton.DISABLED
 
 self.upButton.setState(back_state)
 self.downButton.setState(more_state)
@@ -607,7 +610,8 @@
 buttonOut.setPosAt(1.0, QtCore.QPointF(-iw, Colors.contentStartY + Colors.contentHeight - 26))
 movieOut.append(buttonOut)
 
-if movieShake:
+# movieShake is None when no shake affect, empty list for adding movies in.
+if movieShake == []:
 shakeAnim = DemoItemAnimation(button, DemoItemAnimation.ANIM_UNSPECIFIED)
 shakeAnim.timeline.setCurveShape(QtCore.QTimeLine.LinearCurve)
 shakeAnim.setDuration(650)
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt