[PyQt] PyQt crash on windows soon after instantiating Qt objects

2010-12-11 Thread Blaine Bell
Hi, I have two objects that are each subclassing QGraphicsView and QMainWindow, and I am getting the same behavior for both. Soon after I instantiate one of these objects, the process crashes. I have found that the event(QEvent *) function gets called quite a few times, then the crash happe

[PyQt] converting SWIG objects to SIP objects

2010-09-01 Thread Blaine Bell
I was able to write a SIP function that takes a SWIG object, converts it to a SIP object, as well as a function that converts a SIP object back to a SWIG object: The object I have implemented in SIP and SWIG is called "ChmMol": ChmMol *convertChmMoltoSIP(SIP_PYOBJECT); %MethodCode if (!SWIG

Re: [PyQt] new version sip 4.10.5 with Python 2.7 : connecting to actions no longer work

2010-08-27 Thread Blaine Bell
For what its worth, the object generating the signal has been constructed and is used in C++, and it is accessible from python using SIP (as a member variable and a member function). The connection is not triggered even though it has been setup in python (using QtCore.QObject.connect()). Thi

Re: [PyQt] a subclass for a c++ object

2010-06-26 Thread Blaine Bell
Ah, I see. That is a very interesting problem. I would think that it could be solved by using pointers to member functions, but upon reading up on those, it seems like it could be difficult to figure out whether the subclass has implemented that function (the way member functions are implemen

[PyQt] a subclass for a c++ object

2010-06-25 Thread Blaine Bell
When I subclass a c++ object which is wrapped in SIP, I have found that I need to include all functions of that C++ object in the SIP interface that are used from within that class (or any of its subclasses). For example, this one class I am using in python subclasses a class that subclasses

Re: [PyQt] passing a list by reference to C++ and back....

2010-06-06 Thread Blaine Bell
Phil Thompson wrote: On Fri, 04 Jun 2010 08:01:42 -0400, Blaine Bell wrote: Hi, I have a function that I want to wrap in Python that has a "std::vector<> &"argument. Is it possible to set the changes of the c++ object back to the python object? I have mapped this st

[PyQt] passing a list by reference to C++ and back....

2010-06-04 Thread Blaine Bell
Hi, I have a function that I want to wrap in Python that has a "std::vector<> &"argument. Is it possible to set the changes of the c++ object back to the python object? I have mapped this std::vector<> type to a %MappedType, so I can implement %ConvertFromTypeCode and %ConvertToTypeCode. I

[PyQt] precompiled header to define a variable type which is primitive

2010-06-03 Thread Blaine Bell
I have a variable uint64 that I want to use in a SIP file for arguments, return values, and parts of MappedTypes (i.e., types such as std::map which are used in functions). This variable uint64 is defined differently on platforms in a header: #if defined(WIN32) && defined(_MSC_VER) && _MSC_VE

Re: [PyQt] sip %ConvertToSubClassCode problem with %TypeHeaderCode doesn't work as expected.

2010-06-03 Thread Blaine Bell
Phil Thompson wrote: On Thu, 03 Jun 2010 10:19:11 -0400, Blaine Bell wrote: Hi Phil, Thanks a lot for your quick response. Unfortunately, I am using sip-4.9.3, and neither of these fixes you have listed below work for me. (sipType_ChmMainWindow or %ModuleCode is not recognized). Also

Re: [PyQt] sip %ConvertToSubClassCode problem with %TypeHeaderCode doesn't work as expected.

2010-06-03 Thread Blaine Bell
static function that converts to a sub-class if possible. Am I doing something wrong, or is it a version issue? thanks, Blaine Phil Thompson wrote: On Wed, 02 Jun 2010 17:20:26 -0400, Blaine Bell wrote: I am new to using SIP, and I find it *very* difficult to find reasonable documentation

[PyQt] sip %ConvertToSubClassCode problem with %TypeHeaderCode doesn't work as expected.

2010-06-02 Thread Blaine Bell
I am new to using SIP, and I find it *very* difficult to find reasonable documentation and examples to do what I need to do. I want to be able to have SIP automatically cast my instances to a subclass. I am using "%ConvertToSubClassCode" that uses dynamic_cast<> to figure out whether the sipC