You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I think it will be rather better if QUsbDevice class registers QUsbDevice::DeviceStatus enum, using qRegisterMetaType() instead of having to do it at the application level when trying to connect statusChanged signal to handle a USB error.
qRegisterMetaType<QUsbDevice::DeviceStatus>("QUsbDevice::DeviceStatus"); // Needed so that the following connection does not fail at run time.
connect(m_usb_dev,&QUsbDevice::statusChanged,this,[](QUsbDevice::DeviceStatus status) {
qDebug () << "USB ERROR: " << qint32(status) << " deal with it";
});
The text was updated successfully, but these errors were encountered:
Hello,
I think it will be rather better if QUsbDevice class registers QUsbDevice::DeviceStatus enum, using qRegisterMetaType() instead of having to do it at the application level when trying to connect statusChanged signal to handle a USB error.
The text was updated successfully, but these errors were encountered: