Any way to detect usb device and print his path in QML?
-
@filipdns
I tried on both Windows 10 and Linux. Although the plugin builds,
it just doesn't work as advertised, even for the simplest of examples.
Too bad...@Diracsbracket said in Any way to detect usb device and print his path in QML?:
Yes too bad.. I stay with my problem then... :..( -
@Diracsbracket said in Any way to detect usb device and print his path in QML?:
Yes too bad.. I stay with my problem then... :..(@filipdns
From
https://stackoverflow.com/questions/29414329/is-there-a-qt-solution-for-detecting-usb-events-insertion-and-removal
I just tried this one: it seems to work!
https://github.com/wang-bin/qdevicewatcher
You should be able to wrap it inside a QML class or pass it to the QML context. -
@filipdns
From
https://stackoverflow.com/questions/29414329/is-there-a-qt-solution-for-detecting-usb-events-insertion-and-removal
I just tried this one: it seems to work!
https://github.com/wang-bin/qdevicewatcher
You should be able to wrap it inside a QML class or pass it to the QML context.@Diracsbracket Thank you very much.
I will check that tomorrow.
Just in case and save time, do you know how I have to write the main.cpp with this qdevicewatcher to be able to receive the device path and the add and remove string to my qml?
It's very small part of my project and if I can do not lost time for that it can be nice if you know what I mean ;-)
Kind regards
Philippe -
@Diracsbracket Thank you very much.
I will check that tomorrow.
Just in case and save time, do you know how I have to write the main.cpp with this qdevicewatcher to be able to receive the device path and the add and remove string to my qml?
It's very small part of my project and if I can do not lost time for that it can be nice if you know what I mean ;-)
Kind regards
Philippe@filipdns said in Any way to detect usb device and print his path in QML?:
It's very small part of my project and if I can do not lost time for that it can be nice if you know what I mean ;-)
Sorry, I cannot spend more time on that either. But I'm sure you will find it very quickly. Tomorrow.
It's not that difficult.Good luck.
Paul -
@filipdns said in Any way to detect usb device and print his path in QML?:
It's very small part of my project and if I can do not lost time for that it can be nice if you know what I mean ;-)
Sorry, I cannot spend more time on that either. But I'm sure you will find it very quickly. Tomorrow.
It's not that difficult.Good luck.
Paul@Diracsbracket Hello, I understand, thank you for your help.
Philippe
-
@Diracsbracket Hello, I understand, thank you for your help.
Philippe
@filipdns if your issue is solved please don't forget to mark your post as such. Thanks
-
@filipdns if your issue is solved please don't forget to mark your post as such. Thanks
@Pablo-J.-Rogina hello, that is not the case, I still trying to found solution.
Kind regards
Philippe -
@Pablo-J.-Rogina hello, that is not the case, I still trying to found solution.
Kind regards
Philippe@filipdns said in Any way to detect usb device and print his path in QML?:
that is not the case,
Does
QDeviceWatcher
not work? On my system, it correctly detects insertions and removals but maybe the ID's are not correctly reported as is. -
@filipdns said in Any way to detect usb device and print his path in QML?:
that is not the case,
Does
QDeviceWatcher
not work? On my system, it correctly detects insertions and removals but maybe the ID's are not correctly reported as is.@Diracsbracket hello, it probably working but I didn't understand how I have to work with yet...
-
@filipdns said in Any way to detect usb device and print his path in QML?:
that is not the case,
Does
QDeviceWatcher
not work? On my system, it correctly detects insertions and removals but maybe the ID's are not correctly reported as is.@Diracsbracket About Id I don't need it, I need only to have drive path display in qml text... but in c++ I very beginner