Hi,
In case you are on M$-WIndows, I'd like to mention a nasty bug in Visual C++
2012
that took me days to dig out of google:
http://bugs.python.org/issue17797
In short: when you embedd the python interpreter into an application compiled
as "WINDOWS" (not as "CONSOLE"), the operating system doe
ng symbols:
>Creating library release\hello.lib and object release\hello.exp
> siphellocmodule.obj : error LNK2001: unresolved external symbol "struct
> _pyqt4ClassTypeDef sipTypeDef_hello_MyNamespace"
> (?sipTypeDef_hello_MyNamespace@@3U_pyqt4ClassTypeDef@@A)
> release\hello.dll : fatal error LNK1120: 1 unresolved externals
> What's the proper way to describe this to sip?
Hi,
Are you really compiling and linking all C++ files generated by SIP?
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
gt; "-lpython33_d" to each Makefile.Debug and "-lpython33" to
> Makefile.Release
>> solves this.
>>
>> I tried adding LFLAGS_DEBUG+="-lpython33_d" as parameter to the
> configure
>> script, but it had
>> no effect on the makefiles.
>>
>> (3)
>> The final debugging versions of the DLLs get the wrong names. They all
>> miss the trailing "_d".
>> This way they can't be imported, unless manually renamed arcordingly.
> Try tonight's snapshot.
Thanks.
Using VS2012, it now works out of the box with python 3.3.2 and Qt 5.1.
Have not tested the mingw stuff yet.
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
uot;set%s%s" % (ascii_upper(prop_name[0]),
prop_name[1:]))(prop_value)
AttributeError: 'QHBoxLayout' object has no attribute 'setMargin'
The log_window.ui instantiates a QHBoxLayout, with all margins set to the same
value. This makes
the uic module try to set a "marg
e_AS_UNICODE(obj), qstr.utf16(),
qstr.length() * sizeof (Py_UNICODE));
#endif
return obj;
}
As you can see, this will use a lot of memory in your case.
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
efile.Release
solves this.
I tried adding LFLAGS_DEBUG+="-lpython33_d" as parameter to the configure
script, but it had
no effect on the makefiles.
(3)
The final debugging versions of the DLLs get the wrong names. They all miss the
trailing "_d".
This way they can't be impo
;>> Phil
>>
>> The official "qt-everywhere-opensource-src-5.1.0-alpha.7z" from
>> http://qt-project.org/wiki/Qt-5.1-Alpha
>>
>> Compiled without errors.
> ...so a Qt bug.
> Phil
I find that very strange. Are you saying that
>
>> Manually removing all "# legacy" fixed it. But I couldn't figure out
> which
>> of the
>> build tools put it in there.
> That will come from Qt. Which version of Qt?
> Phil
The official "qt-everywhere-opensource-src-5.1.0-alpha.7z" from
h
moving all "# legacy" fixed it. But I couldn't figure out which of
the
build tools put it in there.
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
drawn by the 3D-chip exclusively. Very fast.
Best Regards,
Mathias Born
On 14.04.2013, 02:15:16 Tom Brown wrote:
> I've created a simple application (see below) that draws a bezier
> curve. I want to give the user the ability to select the curve so
> they can move it around. However,
if sys.platform.startswith("linux") and qt_version >= 0x05:
lib = "Qt5" + lib[2:]
However, my Qt5 build created libraries named "Qt5Gui.lib" and so on, not
"QtGui4.lib".
If I replace
lib = lib + "4"
b
t; in line 1401:
p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=stderr, env=env,
universal_newlines=True)
However, this most likely will break other parts.
Best Regards,
Mathias Born
the cyclic garbage collector." (from the docs)
If "statusbar" were given an extra reference to "window", the crash could be
avoided,
but then "del window" would not delete the window anymore. This would be safer,
but sip currently doesn't do that.
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
e a
crash. Is there any place in PyQt where the Python code has to keep
references to keep the program going?
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
o debugg your entire project is slim. On a mailing list
such as this one, the best way is to reduce the problem to a self
contained, minimum size test case which reproduces the bug.
Best Regards,
Mathias Born
On 05.01.2013, 05:11:10 Lee Harr wrote:
> I develop a free python turtle graph
variable "static int i",
which ought to be different.
The names of these objects, which are both "i", come into existence at
different times. While this is perfectly legal C++, it obviously
obfuscates your program. Just naming them differently should a
to get hold of the wrapper instance. This instance is then used in the
C++ code. It transparently forwards method calls to the Python part.
(That's why it was so important to have the wrapper "re-throw" Python
exceptions as C++ exceptions.)
Thanks to "sipTransfer(obj, Py_None)"
working properly anymore.
sip.h declares
typedef void (*sipVirtErrorHandlerFunc)(struct _sipSimpleWrapper *);
but the generated code containes error handlers that look like
void sipVEH_ltse_app_defaultVirtualErrorHandler(sip_gilstate_t, PyObject *)
And inside other functions they are referred to as, for example
extern void sipVEH_ltse_app_defaultVirtualErrorHandler(sip_gilstate_t, PyObject
*);
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
ve, and
> hg identify
> says "6d704a7ab6c5 tip".
> But now sip.exe crashes with my sip file. Don't have time right now
> to look at it, though.
> Best Regards,
> Mathias Born
I believe you need to add
spec->errorhandlers = NULL;
to the "parse" function
ith my sip file. Don't have time right now
to look at it, though.
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
omments:
In the docs about the "%DefaultVirtualErrorHandler" directive, there is a typo
%DefaultVirtualErrorHandle my_handler
which should read
%DefaultVirtualErrorHandler my_handler
In addition, the function type is not
void my_handler(sip_gilstate_t, PyObject
On 17.09.2012, 18:44:19 Phil Thompson wrote:
> On Mon, 10 Sep 2012 23:31:20 +0200, mathias.b...@gmx.de wrote:
>> Phil,
>>
>> While using /AlloNone/ on a normal mapped type directive like
>>
>> %MappedType boost::optional /AllowNone/
>>
>> works, sip tells me
>>
>> Deprecation warning : type_map
orks, sip tells me
>>
>> Deprecation warning : type_mappings.sip.h:269: Annotation is invalid
>>
>> for
>>
>> template
>> %MappedType boost::optional /AllowNone/
>>
>> If this is intended, why this limitiation
?
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
C++ function creates a new object that will
be owned by the
Python side. I'd like to have another annotation which tells sip that the
Python implementation
of a class method creates a new object that will be owned by the C++ side.
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
rror(pythonExceptionToText());
>> %End
>>
>> which would follow the %Module directive to define the body of an
>> error handler function which is called instead of "throw
> SIPPyException()".
>>
>> Best Regards,
>> Mathias
> In current hg...
> %Virtua
oType",
> who
>> would guess that Py_None has such a different meaning?
>>
>> How about adding a corresponding hint to the documentation
>> of "sipConvertToType"?
> I'm not sure that adding documentation to something about what
On 26.08.2012, 16:07:52 Phil Thompson wrote:
> On Sun, 26 Aug 2012 14:30:32 +0200, mathias.b...@gmx.de wrote:
>> On 26.08.2012, 16:46:24 Phil Thompson wrote:
>>> On Wed, 15 Aug 2012 15:54:11 +0200, mathias.b...@gmx.de wrote:
...
> Should all be fixed in current hg and tonight's snapshot.
> T
How about adding a corresponding hint to the documentation
of "sipConvertToType"?
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
PyException" (derived from
>> std::exception), which becomes part of the API and is always used
>> in such cases.
>> In order not to break existing code, it would only be used in
>> classes or methods which are annotated appropriately.
>> (So an
ndocumented behaviour. Would this be sufficient?
>>
>> I believe so.
> Done in hg.
> Phil
Thanks!
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
re annotated appropriately.
(So an additional annotation is necessary to activate this behavior.)
I believe an extension like this would make sip a lot more useful
for embedding Python into a C++ program.
Best Regards,
Mathias Born
_
t;> What about:
>>
>> if (sipCppHasRef(sipSelf))
>> {
>> sipResetCppHasRef(sipSelf);
>> Py_DECREF(sipSelf);
>> }
>>
>> Is there an official way for my wrapper to have the "SIP_CPP_HAS_REF"
> flag
>> set?
>> It would then automatically dispose its Python counterpart.
> I could change sipTransferTo() to do this if the owner was Py_None. At the
> moment this is undocumented behaviour. Would this be sufficient?
I believe so.
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
==
What about:
if (sipCppHasRef(sipSelf))
{
sipResetCppHasRef(sipSelf);
Py_DECREF(sipSelf);
}
Is there an official way for my wrapper to have the "SIP_CPP_HAS_REF" flag set?
It would then automatically dispose its Python counterpart.
Best
age the Python part myself.
In the sip sources, I can see a flag "SIP_CPP_HAS_REF" that
might just achieve that, but there appears to be no official
way to use it.
Best Regards,
Mathias Born
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Hi,
During my first steps with SIP I discovered that it accepts
function parameters like
void example_function(const T&);
but not
void example_function(T const&);
It would be nice if SIP supported this, too.
Best Regards,
Mathias Born
36 matches
Mail list logo