Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-889

Custom QWidget Shiboken Binding is Failing to build

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 5.12.0
    • PySide, Shiboken
    • None
    • macOS, Windows

    Description

      When porting my first Qt4 module to Qt5, I am able to run the Shiboken2 binding generator, however the resulting binding does not compile due to the following error:

      qprogressindicator/qprogressindicator_wrapper.cpp:2126:5: error: no member named 'Signal' in namespace 'PySide'; did you mean 'sigval'?
          PySide::Signal::registerSignals(Sbk_QProgressIndicator_TypeF(), &::QProgressIndicator::staticMetaObject);
          ^~~~~~~~~~~~~~
          sigval
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/signal.h:158:7: note: 'sigval' declared here
      union sigval {
            ^
      qprogressindicator/qprogressindicator_wrapper.cpp:2126:21: error: no member named 'registerSignals' in 'sigval'
          PySide::Signal::registerSignals(Sbk_QProgressIndicator_TypeF(), &::QProgressIndicator::staticMetaObject);
      

      It appears that a call to PySide::Signal::registerSignals() inside qprogressindicator_wrapper.cpp is unable to access the "Signal" namespace inside the "PySide" namespace.

      I found the declaration of* *registerSignals() inside SITE_PACKAGES/PySide2/include/

      pysidesignal.h. I tried to include it inside my bindings.h file, but it didn't help. I can see that there is a PySide::Signal::*registerSignals() function inside this file, but I can't seem to call it.*

      When I comment out the* PySide::Signal::registerSignals() call inside qprogressindicator_wrapper.cpp the Widget is able to run inside Python as expected, but I have no idea what I just commented out.*

      I have this problem on mac OS 10.13 and Windows 10.  My C++ project is attached and can be built as follows:

      >>>cd QProgressIndicator/
      >>>cd src/
      >>>qmake
      >>>make
      >>>make install
      >>>cd ..
      >>>cd shiboken
      >>>qmake
      >>>make  *(Failure occurs Here)*
      >>>make install
      >>>cd ..
      >>>python main.py
      

      Attachments:

      • root.pri: qmake pro file that is common to all my projects
      • QProgressIndicator.zip: A QWidget that is failing when compiling the python binding
      • universe.zip: The PySide2/example/samplebinding project with qmake instead of cmake. It works correctly but does not use any Qt libraries.

       

      Attachments

        1. QProgressIndicator.zip
          109 kB
        2. root.pri
          1 kB
        3. universe.zip
          70 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            dylanb Dylan Bespalko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes