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

KDE bindings: fatal error: 'pyside6_qtwidgets_python.h' file not found

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.7.2
    • Build System
    • None
    • Linux/Wayland
    • 60a600924 (dev)

    Description

      Hello,

      I am trying to finish https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/450 and I am stuck trying to debug:

       

      /home/carl/kde6/src/kwidgetsaddons/build/python/KWidgetsAddons/kwidgetsaddons_python.h:13:10:fatal error: 
        pyside6_qtwidgets_python.h' file not found
        13 | #include <pyside6_qtwidgets_python.h>
       

      I am aware that the file can be found in /usr/include/PySide6/QtWidgets/pyside6_qtwidgets_python.h

      but I can't find anywhere where this include path is defined.

      In /usr/lib64/cmake/PySide6/PySide6Targets.cmake  the following INTERFACE_INCLUDE_DIRECTORIES is defined /usr/include/PySide6 but this is missing the QtWidgets part in the paths.

      I ended up creating an ugly hack to get it to work

          get_property(PYSIDE_INCLUDE_DIRS TARGET "PySide6::pyside6" PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
          foreach(PYSIDE_INCLUDE_DIR ${PYSIDE_INCLUDE_DIRS})
              file(GLOB PYSIDE_SUBDIRS LIST_DIRECTORIES true "${PYSIDE_INCLUDE_DIR}/*")
              foreach (PYSIDE_SUBDIR ${PYSIDE_SUBDIRS})
                  if (IS_DIRECTORY ${PYSIDE_SUBDIR})
                      set_property(TARGET PySide6::pyside6
                          APPEND
                          PROPERTY INTERFACE_INCLUDE_DIRECTORIES
                          ${PYSIDE_SUBDIR}/
                      )
                  endif()
              endforeach()
          endforeach()
      

      but ideally this should be in the PySide6Config.cmake provided by Qt

      Attachments

        For Gerrit Dashboard: PYSIDE-2882
        # Subject Branch Project Status CR V

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            carl Carl Schwan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes