USB for QT (QtUsb). How to make Qt use the lib?
-
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-devBut 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 -
@UweA What Qt do you use? You installed QtUSB for Qt provided by your distribution - do you use that Qt version?
-
@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. -
@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. -
@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"?)
-
@UweA Did you also run "make install" after building? That should be all you have to do...
-
@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.
7/12