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. USB for QT (QtUsb). How to make Qt use the lib?

USB for QT (QtUsb). How to make Qt use the lib?

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 3 Posters 2.6k 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.
  • U UweA

    I installed QtUSB on my Ubuntu 20.04 (from https://github.com/fpoussin/QtUsb):
    sudo add-apt-repository ppa:fpoussin/ppa
    sudo apt install libqt5usb5 libqt5usb5-dev

    But my Qt Creator (4.11.0) still reports "Unknown module(s) in QT: usb".
    Do I have to tell the QTCreator something like a searchpath?

    Cheers,
    Uwe

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

    @UweA What Qt do you use? You installed QtUSB for Qt provided by your distribution - do you use that Qt version?

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

    1 Reply Last reply
    0
    • U UweA

      I installed QtUSB on my Ubuntu 20.04 (from https://github.com/fpoussin/QtUsb):
      sudo add-apt-repository ppa:fpoussin/ppa
      sudo apt install libqt5usb5 libqt5usb5-dev

      But my Qt Creator (4.11.0) still reports "Unknown module(s) in QT: usb".
      Do I have to tell the QTCreator something like a searchpath?

      Cheers,
      Uwe

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #3

      @UweA
      As per the examples at your link, did you add QT += core usb into your .pro file?

      U 1 Reply Last reply
      0
      • JonBJ JonB

        @UweA
        As per the examples at your link, did you add QT += core usb into your .pro file?

        U Offline
        U Offline
        UweA
        wrote on last edited by
        #4

        @jsulm I'm using Qt Creator 4.11.0(Based on Qt 5.14.0) Is this the right version?

        jsulmJ 1 Reply Last reply
        0
        • U UweA

          @jsulm I'm using Qt Creator 4.11.0(Based on Qt 5.14.0) Is this the right version?

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

          @UweA said in USB for QT (QtUsb). How to make Qt use the lib?:

          Is this the right version?

          No. This is the Qt version which was used to build QtCreator and is completely irrelevant.
          Please check the Kit you're using: which Qt version is used there? Post the path to qmake configured in that Qt version.

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

          U 1 Reply Last reply
          0
          • jsulmJ jsulm

            @UweA said in USB for QT (QtUsb). How to make Qt use the lib?:

            Is this the right version?

            No. This is the Qt version which was used to build QtCreator and is completely irrelevant.
            Please check the Kit you're using: which Qt version is used there? Post the path to qmake configured in that Qt version.

            U Offline
            U Offline
            UweA
            wrote on last edited by
            #6

            @jsulm
            ../Qt/5.12.6/gcc_64/bin/qmake

            Sorry for answering so slowly but I always have to wait 600 seconds until I'm allowed to repost because I'm a new user.

            jsulmJ 1 Reply Last reply
            0
            • U UweA

              @jsulm
              ../Qt/5.12.6/gcc_64/bin/qmake

              Sorry for answering so slowly but I always have to wait 600 seconds until I'm allowed to repost because I'm a new user.

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

              @UweA So, you're using another Qt version (I guess you installed it using online/offline installer?).
              But you installed QtUSB for Qt delivered by your distribution. Either use Qt delivered by your distribution or build QtUSB by yourself using qmake from your own Qt version.

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

              U 1 Reply Last reply
              2
              • jsulmJ jsulm

                @UweA So, you're using another Qt version (I guess you installed it using online/offline installer?).
                But you installed QtUSB for Qt delivered by your distribution. Either use Qt delivered by your distribution or build QtUSB by yourself using qmake from your own Qt version.

                U Offline
                U Offline
                UweA
                wrote on last edited by
                #8

                @jsulm I compiled my own QtUSB version now. Thank you so far!

                But what is to do next? How do I tell Qt to use it? (And which file? Is it "libQt5Usb.so"?)

                JonBJ 1 Reply Last reply
                0
                • U UweA

                  @jsulm I compiled my own QtUSB version now. Thank you so far!

                  But what is to do next? How do I tell Qt to use it? (And which file? Is it "libQt5Usb.so"?)

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #9

                  @UweA
                  I wrote earlier:

                  As per the examples at your link, did you add QT += core usb into your .pro file?

                  Is that relevant to you?

                  U 1 Reply Last reply
                  1
                  • JonBJ JonB

                    @UweA
                    I wrote earlier:

                    As per the examples at your link, did you add QT += core usb into your .pro file?

                    Is that relevant to you?

                    U Offline
                    U Offline
                    UweA
                    wrote on last edited by
                    #10

                    @JonB Yes, it's in the -pro file.
                    Otherwise Qt wouldn't complain about a usb lib that it cannot find.

                    jsulmJ 1 Reply Last reply
                    1
                    • U UweA

                      @JonB Yes, it's in the -pro file.
                      Otherwise Qt wouldn't complain about a usb lib that it cannot find.

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

                      @UweA Did you also run "make install" after building? That should be all you have to do...

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

                      U 1 Reply Last reply
                      1
                      • jsulmJ jsulm

                        @UweA Did you also run "make install" after building? That should be all you have to do...

                        U Offline
                        U Offline
                        UweA
                        wrote on last edited by
                        #12

                        @jsulm Yes, I did and I made a little step forward.
                        The linker is satisfied now but I have problems with using QtUSB.
                        The compiler complains about a missing header file ("QUsbInfo").
                        It looks like that it is missing from the repository. I raised an issue on github.

                        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