Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

PySideQwt revival



  • I'm trying to get "this":https://gitorious.org/pysideqwt running again, but I'm failing to provide "a minimal constructor for type 'Array'" that generatorrunner can use.
    My guess was that i'm missing something that halida got from PythonLibs at ubuntu10, but after adding several array/matrix related python modules to my openSuse, I don't know what else to try.
    Anyone used to shiboken can get me some help?

    Tail of output from my make:
    @Detecting inconsistencies in class model... [OK]
    [OK]
    type 'QwtData' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
    enum 'QwtPicker::RectSelectionType' is specified in typesystem, but not declared
    enum 'QwtLegend::LegendDisplayPolicy' is specified in typesystem, but not declared
    enum 'QwtPlotCurve::CurveType' is specified in typesystem, but not declared
    type 'QwtArrayData' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
    enum 'QwtDial::ScaleOptions' is specified in typesystem, but not declared
    type 'QwtIntervalData' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
    enum 'QwtPicker::SelectionMode' is specified in typesystem, but not declared
    enum 'QwtKnob::Symbol' is specified in typesystem, but not declared
    enum 'QwtPlotPrintFilter::Options' is specified in typesystem, but not declared
    enum 'QwtSlider::BGSTYLE' is specified in typesystem, but not declared
    enum 'QwtLegendItem::IdentifierMode' is specified in typesystem, but not declared
    type 'QwtMetricsMap' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
    type 'QwtPlotPrintFilter' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
    type 'QPyTextObject' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
    enum 'QwtPlotLayout::Options' is specified in typesystem, but not declared
    enum 'QwtDoubleInterval::BorderMode' is specified in typesystem, but not declared
    type 'QwtDoubleInterval' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
    enum 'QwtRasterData::ConrecAttribute' is specified in typesystem, but not declared
    enum 'QwtPicker::SelectionType' is specified in typesystem, but not declared
    type 'QwtPolygonFData' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
    enum 'QwtPlotPrintFilter::Item' is specified in typesystem, but not declared

    Could not find a minimal constructor for type 'Array'. This will result in a compilation error.
    /bin/sh: line 1: 12846 Aborted /usr/bin/generatorrunner --generatorSet=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic /home/raphael/p/work/pysideqwt3/qwt/global.h --include-paths=/usr/include:/usr/include/qwt6 --typesystem-paths=:/usr/share/PySide/typesystems --output-directory=/home/raphael/p/work/pysideqwt3/build/qwt /home/raphael/p/work/pysideqwt3/qwt/typesystem_qwt.xml
    make[2]: *** [qwt/PySideQwt/pysideqwt_module_wrapper.cpp] Error 134
    make[1]: *** [qwt/CMakeFiles/PySideQwt.dir/all] Error 2
    make: *** [all] Error 2
    @



  • Hi rbertoche,

    I'm encountering the same issue on wrapping in Python another library (http://camitk.imag.fr) that my team and I are working on (for details : http://comments.gmane.org/gmane.comp.lib.qt.pyside/4914)

    I've not found lots of information about this issue on the net (shiboken / PySide have not a lot of documentation). Have you found a clue to solve this issue on the qwt project ?

    The library i'm binding to Python uses Qt and VTK.
    Thanks a lot for any help.

    Nicolas.



  • No, i'm sticking to PyQwt, based on PyQt from Riverbank.
    You should create another thread if your issue is unrelated to PySideQwt.

    But I may still need to get PySideQwt working, for I need to use a custom subclass of QwtData that gets data from our C++ lib. This lib must be able to send python IndexError through python's C API back to QwtData. Currently I cannot do this.
    I'm hoping to get this done later with PySideQwt. An alternative would be to write this QwtData subclass in C++ and binding through a capsule or opaque pointer to python, but it would be much worse.
    I'll be posting here if I get any results.



  • Thanks for your answer and your feedback. I'm taking deeper looks in the APIExtractor / shiboken documentation to modify the typesystem.xml file accordingly to the error messages.

    Thanks for any post you'll make on PySideQwt.



  • Hi rbertoche,

    Found out a solution to the "Minimal constructor for type 'Array'" issue we encountered using Shiboken. See : http://comments.gmane.org/gmane.comp.lib.qt.pyside/4914

    If you go back on PySideQwt, this might helps you.

    Nicolas.



  • I can't open this link from here... Looks like their list is offline, somehow its posts won't appear even when I browse directly from gmane.org.

    Can you tell me what you did? Or I'll have to wait until it's fixed



  • Hi rbertoche,

    The link I gave you is the content of the PySide mailinglist, which I advice you to follow if you don't yet.
    Here the content of my post on this issue :

    Hi PySide users,

    To answer my question, hoping this solution would help anyone encountering this issue.
    The problem comes from C++ methods' signature featuring tabs. In our project's case, it was double tab[size] in several methods.
    There is no proper ways to ask Shiboken to change the method's signature during the binding (i.e. by using some API-Extractor binding rules, like <modify-function> with <modify-argument> tags), as it seems to be a bug in Shiboken (not solved) : https://bugreports.qt-project.org/browse/PYSIDE-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

    In our case, the solution was to change the C++ methods' signature with pointors instead, which is acceptable in the native C++ code.

    Feel free to react to this solution,
    Nicolas.



  • I'm watching on that bug report now.

    I thought better of PySide, C arrays are old, but aren't that rare...

    Until they fix it I may have to change a lot of definitions and declarations in a lib I never patched... It would be hell later when I need to update QWT to a new version. At least it would be a patch that in fact changes nothing.

    I'm still unable to open the link at gmane you posted before.

    Thanks for your help, Nicolas!



  • You're welcome !

    When I changed the C++ signature from tab to pointors, it wasn't so long, only I care about how globally the memory was handled in the code.

    Regarding PySide, I agree, C arrays are common, and such a bug should be fixed. As you noticed, this was opened more than 1 year ago, and still not fixed ... I'm more and more thinking the PySide project is a bit dying, and the only support I've found is the mailinglist.

    Hope we'll manage to use shiboken successfully with our projects !

    Nicolas.

    PS : Gmane server seems dead indeed ...



  • http://www.pyqtgraph.org/
    pyqtgraph is a good alternativeļ¼


Log in to reply