User Activity

  • Posted a comment on discussion Help on PythonQt

    Specific DLLs may or may not work with each other, depending on respective compiler options at build time (Google or see here https://stackoverflow.com/questions/11658915/mixing-debug-and-release-library-binary-bad-practice for background). DLLs for the standard modules are built as part of Python (they are the files in Python's lib/lib-dynload directory); numpy is not part of standard Python, so is built by separately. Did you build your own Python?? It's only those modules that provide DLLs (pyd...

  • Posted a comment on discussion Help on PythonQt

    If you are in debug mode then you need a debug version of numpy's shared libraries, which means building a debug version of numpy yourself. Windows can't mix Debug and Release mode DLLs. On 13/09/19 9:34 PM, Nick Bowsher wrote: Alright so I solved my problem. The whole time I was on Debug mode and the external package imports would not work for whatever reason. Even though I correctly linked all debug libs etc. Luckily I just switched over to release mode and everything is working fine now. It wouldn't...

  • Posted a comment on discussion Open Discussion on PythonQt

    Currently the docstring generated for a slot doesn't account for the slot being an instance wrapper. The following fixes this and also uses actual parameter names in the generated method signature. diff --git a/src/PythonQtSlot.cpp b/src/PythonQtSlot.cpp index 612a667..c5c2994 100644 --- a/src/PythonQtSlot.cpp +++ b/src/PythonQtSlot.cpp @@ -481,11 +481,17 @@ meth_get__doc__(PythonQtSlotFunctionObject * m, void * /*closure*/) infoSearch = infoSearch->nextInfo(); } doc = "X." + info->slotName(true)...

  • Posted a comment on discussion Help on PythonQt

    Yes, Python 3.5

  • Posted a comment on discussion Help on PythonQt

    I get this with Qt 5.6 / Python 3.5. Looking at the relevant code in a debugger, PythonQtCallSlot() appears to return failure if the slot has void result type. The following makes things work: diff --git a/src/PythonQtSlot.cpp b/src/PythonQtSlot.cpp index 711cb4a..adcdda6 100644 --- a/src/PythonQtSlot.cpp +++ b/src/PythonQtSlot.cpp @@ -235,6 +235,7 @@ bool PythonQtCallSlot(PythonQtClassInfo* classInfo, QObject* objectToCall, PyObj } } else { result = NULL; + ok = false; } } recursiveEntry--; @@ -256,7...

  • Posted a comment on discussion Help on PythonQt

    Is this expected behaviour? Qt 5.6 and trunk PythonQt. >>> from PythonQt import QtGui >>> selection = QtGui.QTextEdit.ExtraSelection() >>> fmt = QtGui.QTextCharFormat() >>> selection.format QTextCharFormat (QTextFormat(QTextFormat::FormatType(2)) , at: 0x7f9b17a1c6e0) >>> fmt QTextCharFormat (QTextFormat(QTextFormat::FormatType(2)) , at: 0x7f9b192736e0) >>> selection.format = fmt ValueError: Called py_set_format(QTextCharFormat format) -> void with wrong arguments: (QTextCharFormat (QTextFormat(QTextFormat::FormatType(2))...

  • Posted a comment on discussion Help on PythonQt

    Sure, that works, but the point of using super() is to have Python search back through the MRO without have to explicitely refer to base classes. From reading the Descriptor HowTo Guide relevant code is in Objects/typeobject.c but I'm not sure of what would need doing in PythonQt's code.

  • Posted a comment on discussion Help on PythonQt

    Oops, bad example... I meant: >>> from PythonQt import QtGui >>> >>> t = QtGui.QTextDocument() >>> >>> class C(QtGui.QSyntaxHighlighter): ... def __init__(self, b): ... super(C, self).__init__(b) ... >>> c = C(t) >>> c.currentBlock() QTextBlock (C++ object at: 0x7f9d04d83fe0) >>> >>> super(C, c).currentBlock() Traceback (most recent call last): File "<console>", line 1, in <module> AttributeError: 'super' object has no attribute 'currentBlock'

View All

Personal Data

Username:
dbrnz
Joined:
2011-08-18 23:17:07

Projects

  • No projects to display.

Personal Tools

MongoDB Logo MongoDB