Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. import QtQml.StateMachine not working
Qt 6.11 is out! See what's new in the release blog

import QtQml.StateMachine not working

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 3 Posters 1.6k 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.
  • H Offline
    H Offline
    Hrovac
    wrote on last edited by
    #1

    can someone please explain me why i cant import QtQm.StateMachine?
    or better
    point me to some documentation about it?

    i cant find any explanations in the documentation.
    https://doc.qt.io/qt-6/qtstatemachine-index.html
    Thank you.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you apply the cmake/qmake configuration explained in that file ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hrovac
        wrote on last edited by
        #3

        yes, as mentioned in the documentation i pasted

        find_package(Qt6 REQUIRED COMPONENTS StateMachine)
        target_link_libraries(mytarget PRIVATE Qt6::StateMachine)
        

        into the CMakeLists.txt

        but getting the following errormessages:

        ..\CMakeLists.txt:14: error: Found package configuration file: C:/Qt/6.4.2/android_armv7/lib/cmake/Qt6/Qt6Config.cmake but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT FOUND. Reason given by package: Failed to find required Qt component "StateMachine". Expected Config file at "C:/Qt/6.4.2/android_armv7/lib/cmake/Qt6StateMachine/Qt6StateMachineConfig.cmake" does NOT exist

        Am i supposed to add more? sry, i'm a big noob and probably ask naive questions..

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Might be a silly question but did you check whether you have the module installed for that platform ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • H Offline
            H Offline
            Hrovac
            wrote on last edited by
            #5

            ok, can you please explain to me how i check if this module is installed.
            in which folder should it be located?

            All modules i used up to now - where already installed and just had to be imported..

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MhmRhm
              wrote on last edited by MhmRhm
              #6

              I had the same issue. Adding the following cache variable or setting it in command line with -DQT_DEBUG_FIND_PACKAGE=ON, hinted the issue for me:

              "QT_DEBUG_FIND_PACKAGE": "TRUE",
              

              StateMachine depends on GUI and it depends on WrapOpenGL and that depends on glx library:

              ...
              
              [cmake] -- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR) 
              [cmake] -- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_INCLUDE_DIR OpenGL) 
              [cmake] -- Could NOT find WrapOpenGL (missing: WrapOpenGL_FOUND) 
              [cmake] CMake Warning at /home/mohammad/vcpkg/scripts/buildsystems/vcpkg.cmake:904 (_find_package):
              [cmake]   Found package configuration file:
              [cmake] 
              [cmake]     /home/mohammad/Qt/6.10.0/gcc_arm64/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake
              [cmake] 
              [cmake]   but it set Qt6Gui_FOUND to FALSE so package "Qt6Gui" is considered to be
              [cmake]   NOT FOUND.  Reason given by package:
              [cmake] 
              [cmake]   Qt6Gui could not be found because dependency WrapOpenGL could not be found.
              
              ...
              
              [cmake]   Found package configuration file:
              [cmake] 
              [cmake]     /home/mohammad/Qt/6.10.0/gcc_arm64/lib/cmake/Qt6StateMachine/Qt6StateMachineConfig.cmake
              [cmake] 
              [cmake]   but it set Qt6StateMachine_FOUND to FALSE so package "Qt6StateMachine" is
              [cmake]   considered to be NOT FOUND.  Reason given by package:
              [cmake] 
              [cmake]   Qt6StateMachine could not be found because dependency Qt6Gui could not be
              [cmake]   found.
              

              Installing one package fixed my issue:

              sudo apt-get install libgl1-mesa-dev
              
              1 Reply Last reply
              1

              • Login

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