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. Not able to fine qtSerialPort module in QT6
Forum Updated to NodeBB v4.3 + New Features

Not able to fine qtSerialPort module in QT6

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.5k Views
  • 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
    Hareesha
    wrote on last edited by
    #1

    Hi ,

    Following is QT environment details
    QT Creator version used is: 6.2.4
    QT Cmake version: 3.21.1

    I have updated CMakeList.txt file with below to include serial in QT6

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

    Still not able to find the serial port module. Following is the error

    Could NOT find Qt6SerialPort (missing: Qt6SerialPort_DIR)
    CMake Error at CMakeLists.txt:14 (find_package):
    Found package configuration file:

    C:/Qt/6.2.4/mingw_64/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 Qt component "SerialPort".

    Expected Config file at
    "C:/Qt/6.2.4/mingw_64/lib/cmake/Qt6SerialPort/Qt6SerialPortConfig.cmake"
    does NOT exist

    Please do the needful

    Regards,
    Hareesha

    KroMignonK 1 Reply Last reply
    0
    • H Hareesha

      Hi ,

      Following is QT environment details
      QT Creator version used is: 6.2.4
      QT Cmake version: 3.21.1

      I have updated CMakeList.txt file with below to include serial in QT6

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

      Still not able to find the serial port module. Following is the error

      Could NOT find Qt6SerialPort (missing: Qt6SerialPort_DIR)
      CMake Error at CMakeLists.txt:14 (find_package):
      Found package configuration file:

      C:/Qt/6.2.4/mingw_64/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 Qt component "SerialPort".

      Expected Config file at
      "C:/Qt/6.2.4/mingw_64/lib/cmake/Qt6SerialPort/Qt6SerialPortConfig.cmake"
      does NOT exist

      Please do the needful

      Regards,
      Hareesha

      KroMignonK Offline
      KroMignonK Offline
      KroMignon
      wrote on last edited by
      #2

      @Hareesha Hello and welcome to Qt Forum!

      Did you install the Qt Serial Port libraries with Qt Maintenance Tool?
      25fdbb6d-b6bd-4a1d-829e-0ab6f65dd55f-image.png

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      1 Reply Last reply
      2

      • Login

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