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. QT unknown module serial port
Forum Updated to NodeBB v4.3 + New Features

QT unknown module serial port

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 5 Posters 1.9k 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.
  • L Offline
    L Offline
    lukutis222
    wrote on 22 Jul 2022, 06:46 last edited by
    #1

    Hello. I have just downloaded a trial version QT on Windows 10 operating system. I have followed default installation steps and selected the following options for my installation:

    Design Tools
    QT 6.3 for desktop development
    QT 6.3 for embedded development
    MCU development

    After installation, I have created a simple qt widget application, selected qmake and added qtwidget class.

    I would like to send some serial data to connected serial device. I have added QT += serialport to my .pro file

    QT       += core gui
    QT       += serialport
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += c++17
    
    # You can make your code fail to compile if it uses deprecated APIs.
    # In order to do so, uncomment the following line.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    SOURCES += \
        main.cpp \
        widget.cpp
    
    HEADERS += \
        widget.h
    
    FORMS += \
        widget.ui
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    

    However, I can not build the project succesfully as the serial port is not recognised.

    09:40:27: Configuration unchanged, skipping qmake step.
    09:40:27: Starting: "C:\Qt\Tools\mingw1120_64\bin\mingw32-make.exe" -j16
    C:\Qt\6.3.1\mingw_64\bin\qmake.exe -o Makefile ..\UTB_gui\UTB_gui.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
    Project ERROR: Unknown module(s) in QT: serialport
    mingw32-make: *** [Makefile:223: Makefile] Error 3
    09:40:28: The process "C:\Qt\Tools\mingw1120_64\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project UTB_gui (kit: Desktop Qt 6.3.1 MinGW 64-bit)
    When executing step "Make"
    09:40:28: Elapsed time: 00:01.
    

    Could you clarify the following:

    1. Do I need to manually download different modules?
    2. If yes to above, could you clarify how can this be done and how to import the downloaded modules such as serialport
    3. If no, can you clarify how can I get the required modules?
    J 1 Reply Last reply 22 Jul 2022, 06:48
    0
    • L lukutis222
      22 Jul 2022, 06:46

      Hello. I have just downloaded a trial version QT on Windows 10 operating system. I have followed default installation steps and selected the following options for my installation:

      Design Tools
      QT 6.3 for desktop development
      QT 6.3 for embedded development
      MCU development

      After installation, I have created a simple qt widget application, selected qmake and added qtwidget class.

      I would like to send some serial data to connected serial device. I have added QT += serialport to my .pro file

      QT       += core gui
      QT       += serialport
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      CONFIG += c++17
      
      # You can make your code fail to compile if it uses deprecated APIs.
      # In order to do so, uncomment the following line.
      #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
      
      SOURCES += \
          main.cpp \
          widget.cpp
      
      HEADERS += \
          widget.h
      
      FORMS += \
          widget.ui
      
      # Default rules for deployment.
      qnx: target.path = /tmp/$${TARGET}/bin
      else: unix:!android: target.path = /opt/$${TARGET}/bin
      !isEmpty(target.path): INSTALLS += target
      
      

      However, I can not build the project succesfully as the serial port is not recognised.

      09:40:27: Configuration unchanged, skipping qmake step.
      09:40:27: Starting: "C:\Qt\Tools\mingw1120_64\bin\mingw32-make.exe" -j16
      C:\Qt\6.3.1\mingw_64\bin\qmake.exe -o Makefile ..\UTB_gui\UTB_gui.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
      Project ERROR: Unknown module(s) in QT: serialport
      mingw32-make: *** [Makefile:223: Makefile] Error 3
      09:40:28: The process "C:\Qt\Tools\mingw1120_64\bin\mingw32-make.exe" exited with code 2.
      Error while building/deploying project UTB_gui (kit: Desktop Qt 6.3.1 MinGW 64-bit)
      When executing step "Make"
      09:40:28: Elapsed time: 00:01.
      

      Could you clarify the following:

      1. Do I need to manually download different modules?
      2. If yes to above, could you clarify how can this be done and how to import the downloaded modules such as serialport
      3. If no, can you clarify how can I get the required modules?
      J Online
      J Online
      J.Hilk
      Moderators
      wrote on 22 Jul 2022, 06:48 last edited by
      #2

      @lukutis222 see this topic for all the answers you seek:

      https://forum.qt.io/topic/138060/uknown-module-s-in-qr-serialport


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      2
      • L Offline
        L Offline
        lukutis222
        wrote on 22 Jul 2022, 06:55 last edited by
        #3

        Thank you for your fast response. Unfortunately, it is still not clear for me. How do I open this window?
        7cacc9b3-2a66-4c6f-bae7-0fbd19e65938-image.png

        By the way, I have installed qt using online installer

        J 1 Reply Last reply 22 Jul 2022, 06:57
        0
        • L lukutis222
          22 Jul 2022, 06:55

          Thank you for your fast response. Unfortunately, it is still not clear for me. How do I open this window?
          7cacc9b3-2a66-4c6f-bae7-0fbd19e65938-image.png

          By the way, I have installed qt using online installer

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 22 Jul 2022, 06:57 last edited by
          #4

          @lukutis222 said in QT unknown module serial port:

          By the way, I have installed qt using online installer

          Then open Qt Maintenance Tool (its executable is in your Qt installation folder) and select this module there.

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

          L 1 Reply Last reply 22 Jul 2022, 07:01
          2
          • J jsulm
            22 Jul 2022, 06:57

            @lukutis222 said in QT unknown module serial port:

            By the way, I have installed qt using online installer

            Then open Qt Maintenance Tool (its executable is in your Qt installation folder) and select this module there.

            L Offline
            L Offline
            lukutis222
            wrote on 22 Jul 2022, 07:01 last edited by
            #5

            @jsulm I have managed to do it. Thank you very much

            1 Reply Last reply
            1
            • A Offline
              A Offline
              AnushaDevi
              wrote on 1 Oct 2024, 12:00 last edited by
              #6

              I couldn't find QSerialPort in qt 6.7.2 under Qt Maintenance Tool. Kindly help

              J 1 Reply Last reply 1 Oct 2024, 12:08
              0
              • A AnushaDevi
                1 Oct 2024, 12:00

                I couldn't find QSerialPort in qt 6.7.2 under Qt Maintenance Tool. Kindly help

                J Online
                J Online
                J.Hilk
                Moderators
                wrote on 1 Oct 2024, 12:08 last edited by
                #7

                @AnushaDevi look closer, it is there.

                Maybe you'll have to check the Archive checkbox, since 6.7.3 is released it doesn't display it by default any longer for 6.7.2

                In fact 6.7.2 is only shown at all when you have something installed from it already, or the Archive checkbox checked.


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  AnushaDevi
                  wrote on 1 Oct 2024, 15:15 last edited by AnushaDevi 10 Jan 2024, 15:17
                  #8

                  @J-Hilk

                  I couldn't find

                  serialport.PNG

                  J 1 Reply Last reply 2 Oct 2024, 05:05
                  0
                  • C Offline
                    C Offline
                    ChrisW67
                    wrote on 1 Oct 2024, 20:34 last edited by
                    #9

                    For open source user the Qt Company only provides complete prebuilt library binaries for the latest released version in the current series; in this case 6.7.3. For the preceding series, i.e 5.15, only the latest available at the time Qt 6 released remains available. The source code for Qt 6.7.2 remains available, and you could build your own serial submodule if you wish.
                    Commercial licensees have more options.

                    1 Reply Last reply
                    1
                    • A AnushaDevi
                      1 Oct 2024, 15:15

                      @J-Hilk

                      I couldn't find

                      serialport.PNG

                      J Online
                      J Online
                      J.Hilk
                      Moderators
                      wrote on 2 Oct 2024, 05:05 last edited by
                      #10

                      @AnushaDevi click the filter button after checking the checkbox. That will trigger a download and update of the selection tree


                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                      Q: What's that?
                      A: It's blue light.
                      Q: What does it do?
                      A: It turns blue.

                      1 Reply Last reply
                      1
                      • C Offline
                        C Offline
                        ChrisW67
                        wrote on 2 Oct 2024, 07:27 last edited by
                        #11

                        You live and you learn. If you do not select Archive it shows only the submodules you already have installed for older versions, as if the others do not exist.
                        image.png

                        image.png

                        I guess this is to nudge people to stay current.

                        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