Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. cannot import QWaylandSeat
Forum Updated to NodeBB v4.3 + New Features

cannot import QWaylandSeat

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 678 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tubbadu
    wrote on last edited by
    #1

    Hello! I'm trying to use QWaylandSeat to emulate keyboard input from my application (QT5)

    just including

     #include <QWaylandSeat>
    

    in my main.cpp file gives this error:

    fatal error: QWaylandSeat: File or directory does not exists
    2 | #include <QWaylandSeat>
    |          ^~~~~~~~~~~~~~
    compilation terminated.
    

    so I tried adding in my CMakeLists.txt this:

    find_package(Qt5 REQUIRED COMPONENTS Waylandcompositor)
    target_link_libraries(mytarget PRIVATE Qt5::Waylandcompositor)
    

    as specified in the Qt6 doc page, not the Qt5, editing just the lines where the Qt version was specified, from Qt6 to Qt5.
    This is the output:

    CMake Error at /usr/lib64/cmake/Qt5/Qt5Config.cmake:28 (find_package):
    Could not find a package configuration file provided by
    "Qt5Waylandcompositor" with any of the following names:
    
    Qt5WaylandcompositorConfig.cmake
    qt5waylandcompositor-config.cmake
    
    Add the installation prefix of "Qt5Waylandcompositor" to CMAKE_PREFIX_PATH
    or set "Qt5Waylandcompositor_DIR" to a directory containing one of the
    above files.  If "Qt5Waylandcompositor" provides a separate development
    package or SDK, be sure it has been installed.
    Call Stack (most recent call first):
    src/CMakeLists.txt:4 (find_package)
    

    I did a dnf search and installed those packages:

    • wayland-devel
    • kf5-kwayland-devel.x86_64
    • qt5-qtwayland (already installed)
    • qt5-qtwayland-devel (already installed)

    but nothing changed, always same error

    what is the problem? Am I missing a package?

    I'm running Fedora36 KDE spin with wayland session

    thanks in advance!

    jsulmJ 1 Reply Last reply
    0
    • T tubbadu

      Hello! I'm trying to use QWaylandSeat to emulate keyboard input from my application (QT5)

      just including

       #include <QWaylandSeat>
      

      in my main.cpp file gives this error:

      fatal error: QWaylandSeat: File or directory does not exists
      2 | #include <QWaylandSeat>
      |          ^~~~~~~~~~~~~~
      compilation terminated.
      

      so I tried adding in my CMakeLists.txt this:

      find_package(Qt5 REQUIRED COMPONENTS Waylandcompositor)
      target_link_libraries(mytarget PRIVATE Qt5::Waylandcompositor)
      

      as specified in the Qt6 doc page, not the Qt5, editing just the lines where the Qt version was specified, from Qt6 to Qt5.
      This is the output:

      CMake Error at /usr/lib64/cmake/Qt5/Qt5Config.cmake:28 (find_package):
      Could not find a package configuration file provided by
      "Qt5Waylandcompositor" with any of the following names:
      
      Qt5WaylandcompositorConfig.cmake
      qt5waylandcompositor-config.cmake
      
      Add the installation prefix of "Qt5Waylandcompositor" to CMAKE_PREFIX_PATH
      or set "Qt5Waylandcompositor_DIR" to a directory containing one of the
      above files.  If "Qt5Waylandcompositor" provides a separate development
      package or SDK, be sure it has been installed.
      Call Stack (most recent call first):
      src/CMakeLists.txt:4 (find_package)
      

      I did a dnf search and installed those packages:

      • wayland-devel
      • kf5-kwayland-devel.x86_64
      • qt5-qtwayland (already installed)
      • qt5-qtwayland-devel (already installed)

      but nothing changed, always same error

      what is the problem? Am I missing a package?

      I'm running Fedora36 KDE spin with wayland session

      thanks in advance!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @tubbadu I never used this module, but maybe you need to install it first? Some modules are not installed automatically.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tubbadu
        wrote on last edited by
        #3

        what package could it be? qt5-qtwayland and qt5-qtwayland-devel are already installed

        is there somewhere in the docs that says which package does it belongs to?

        thanks for the answer!

        jsulmJ 1 Reply Last reply
        0
        • T tubbadu

          what package could it be? qt5-qtwayland and qt5-qtwayland-devel are already installed

          is there somewhere in the docs that says which package does it belongs to?

          thanks for the answer!

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @tubbadu So, you installed your Linux distribution packaged Qt? In that case you will not find anything in Qt documentation as packaging is up to the Linux distribution. Is this the only Qt version installed on your machine?
          On my Ubuntu machine I have this package: libqt5waylandcompositor5

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          T 1 Reply Last reply
          0
          • jsulmJ jsulm

            @tubbadu So, you installed your Linux distribution packaged Qt? In that case you will not find anything in Qt documentation as packaging is up to the Linux distribution. Is this the only Qt version installed on your machine?
            On my Ubuntu machine I have this package: libqt5waylandcompositor5

            T Offline
            T Offline
            tubbadu
            wrote on last edited by
            #5

            @jsulm those are the packages I get running dnf search qt wayland:

            gambas3-gb-qt5-wayland.x86_64 : Gambas3 component package for qt5-wayland
            qt5-qtwayland.x86_64 : Qt5 - Wayland platform support and QtCompositor module
            qt5-qtwayland.i686 : Qt5 - Wayland platform support and QtCompositor module
            qt5-qtwayland-devel.x86_64 : Development files for qt5-qtwayland
            qt5-qtwayland-devel.i686 : Development files for qt5-qtwayland
            qt5-qtwayland-doc.noarch : Documentation for qtwayland
            qt5-qtwayland-examples.x86_64 : Programming examples for qt5-qtwayland
            qt6-qtwayland.x86_64 : Qt6 - Wayland platform support and QtCompositor module
            qt6-qtwayland.i686 : Qt6 - Wayland platform support and QtCompositor module
            qt6-qtwayland-devel.i686 : Development files for qt6-qtwayland
            qt6-qtwayland-devel.x86_64 : Development files for qt6-qtwayland
            qt6-qtwayland-examples.x86_64 : Programming examples for qt6-qtwayland
            

            (I'm on fedora36 KDE spin)
            is fedora missing a package?

            thanks!

            jsulmJ 1 Reply Last reply
            0
            • T tubbadu

              @jsulm those are the packages I get running dnf search qt wayland:

              gambas3-gb-qt5-wayland.x86_64 : Gambas3 component package for qt5-wayland
              qt5-qtwayland.x86_64 : Qt5 - Wayland platform support and QtCompositor module
              qt5-qtwayland.i686 : Qt5 - Wayland platform support and QtCompositor module
              qt5-qtwayland-devel.x86_64 : Development files for qt5-qtwayland
              qt5-qtwayland-devel.i686 : Development files for qt5-qtwayland
              qt5-qtwayland-doc.noarch : Documentation for qtwayland
              qt5-qtwayland-examples.x86_64 : Programming examples for qt5-qtwayland
              qt6-qtwayland.x86_64 : Qt6 - Wayland platform support and QtCompositor module
              qt6-qtwayland.i686 : Qt6 - Wayland platform support and QtCompositor module
              qt6-qtwayland-devel.i686 : Development files for qt6-qtwayland
              qt6-qtwayland-devel.x86_64 : Development files for qt6-qtwayland
              qt6-qtwayland-examples.x86_64 : Programming examples for qt6-qtwayland
              

              (I'm on fedora36 KDE spin)
              is fedora missing a package?

              thanks!

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @tubbadu said in cannot import QWaylandSeat:

              is fedora missing a package?

              I don't know. You could also check the content of the *-devel packages to see whether one of them contains QWaylandSeat header file.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved