[PyQt] PyObject to QVariant and back

2012-03-07 Thread Benjamin Kloster
Hi everyone, since my use case is a rather long-winded description of my predicament, first my question: Are there API functions of sip that I can use to convert a PyObject* to a QVariant with the appropriate type and the other way around? Now why I could really use such functions: For our a

Re: [PyQt] Designer source

2012-03-07 Thread JPolk
...'cause it would make it easier for me to merge Designer with Maya ;-) -- View this message in context: http://python.6.n6.nabble.com/Designer-source-tp4556647p4556938.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing list

Re: [PyQt] Designer source

2012-03-07 Thread Andreas Pakulat
On 07.03.12 13:42:12, JPolk wrote: > > ...I think I know the answer to this already, but just to be sure,... > > Does Designer only exist as a C or C++ source program?... Yes. > Meaning, has anybody ported this over into the Python language? Why? Whats the benefit of doing that? Andreas

[PyQt] Designer source

2012-03-07 Thread JPolk
...I think I know the answer to this already, but just to be sure,... Does Designer only exist as a C or C++ source program?... Meaning, has anybody ported this over into the Python language? Thanks, Jim -- View this message in context: http://python.6.n6.nabble.com/Designer-source-tp45566

[PyQt] New member

2012-03-07 Thread Shoemaker, Ronnie A (N-UNITED SPACE ALLIANCE, LLC)
Hi. I am a new member of this mailing list. I am writing a GUI in PyQt4 that will use drag and drop of images to put a simulation together. I found one drag and drop example that uses QLabels loaded with png files. I need to be able to draw my own images or at least load other types onto my GUI.

Re: [PyQt] sip: Member objects and GC

2012-03-07 Thread Jonathan Kleinehellefort
Thanks, I tried it. Now, instead of being destroyed early, the object is never destroyed, which I believe means that it leaks memory. Maybe you created a reference cycle? -- Jonathan ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.rive

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Andreas Pakulat
On 07.03.12 15:42:34, Mads Ipsen wrote: > OK, I agree, the snippets I provided were not nice, and I apologize > for that. > > But suppose that the constructor in your class starts a thread that > generates say an icon for a QStandardItem. Then you want to make > sure that the thread has finished b

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Mads Ipsen
OK, I agree, the snippets I provided were not nice, and I apologize for that. But suppose that the constructor in your class starts a thread that generates say an icon for a QStandardItem. Then you want to make sure that the thread has finished before you test that the icon has been created.

[PyQt] SQLite database not closing

2012-03-07 Thread Louis Cordier
Hi, I am currently having problems with closing a database (SQLite) connection. The database and driver's lastError is: "unable to close due to unfinalised statements Error closing database" I am not sure what this really means or what I should be doing to get the connection to close properly. I

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Andreas Pakulat
On 07.03.12 09:37:38, Mads Ipsen wrote: > Hi, > > I have a general question about how to unit test PyQt applications > using the Python unittest moudle. I have attached a few examples. If > you have time to take a look and comment, it would be great. > > The first module, Foo.py, defines a simple

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Mads Ipsen
On 07/03/2012 09:43, Luca Beltrame wrote: In data mercoledì 7 marzo 2012 09:37:38, Mads Ipsen ha scritto: the Python unittest moudle. I have attached a few examples. If you have time to take a look and comment, it would be great. I have a question on FooTest: is having a QApplication instance

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Mads Ipsen
Have modified the Bar example, since the thread was never started. Sorry for posting an incomplete example. Anyway, now in this case, running the unittest gives: FQThread: Destroyed while thread is still running Segmentation fault On 07/03/2012 09:43, Luca Beltrame wrote: In data mercoledì 7

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Mads Ipsen
On 07/03/2012 09:43, Luca Beltrame wrote: In data mercoledì 7 marzo 2012 09:37:38, Mads Ipsen ha scritto: the Python unittest moudle. I have attached a few examples. If you have time to take a look and comment, it would be great. I have a question on FooTest: is having a QApplication instance

Re: [PyQt] Unit testing PyQt applications

2012-03-07 Thread Luca Beltrame
In data mercoledì 7 marzo 2012 09:37:38, Mads Ipsen ha scritto: > the Python unittest moudle. I have attached a few examples. If you have > time to take a look and comment, it would be great. I have a question on FooTest: is having a QApplication instance enough in unittest to ensure emission of

[PyQt] Unit testing PyQt applications

2012-03-07 Thread Mads Ipsen
Hi, I have a general question about how to unit test PyQt applications using the Python unittest moudle. I have attached a few examples. If you have time to take a look and comment, it would be great. The first module, Foo.py, defines a simple widget called 'Widget' which is tested in FooTes