Hi,
I think D-Bus is another blackhole I don't have time for right now, I'll consider this on my next version. (recompile qt, libraries, etc).
Here is the response I received from Qt Tech support:
For Qt Embedded or Qt/Linux:
- If you want to know when a USB stick has been plugged in and then read data from it, this should be relatively easy. When the USB stick is plugged, most morden Linux kernels will automatically mount it to a particular location that would let you access it using the normal file system operation. If the Linux kernel is compiled with HAL support (Hardware Abstraction Layer) and D-Bus is installed then you can use the 'hald' daemon to receive notifications. When any device is plugged in, you can use the QtDBus? module to listen on the system bus and be notifed of new devices:
qDebug() << "Cannot connect to system bus";
}
"org.freedesktop.Hal",
"/org/freedesktop/Hal/Manager",
"org.freedesktop.Hal.Manager",
"DeviceAdded",
this, SLOT(deviceAdded()));
if (!QDBusConnection::systemBus().isConnected()) {
qDebug() << "Cannot connect to system bus";
}
bool connected = QDBusConnection::systemBus().connect(
"org.freedesktop.Hal",
"/org/freedesktop/Hal/Manager",
"org.freedesktop.Hal.Manager",
"DeviceAdded",
this, SLOT(deviceAdded()));
To copy to clipboard, switch view to plain text mode
Bookmarks