KFingerManager is now part of KDE System Settings, hide under About Me icon.
Zobrazují se příspěvky se štítkemQt. Zobrazit všechny příspěvky
Zobrazují se příspěvky se štítkemQt. Zobrazit všechny příspěvky
2. dubna 2009
31. března 2009
Qt vs D-Bus: access to properties with dash in name
For properties without dash you should simple use:
But if property name contains dash, you must use different approach:
Service, path, bus, interface are same for both examples. See bug #20948 on bugs.freedesktop.org.
QDBusInterface *iface = new QDBusInterface(service, path, interface, bus);
if (iface) {
if (iface->isValid()) {
int s = iface->property("property_name").toInt();
}
delete iface;
}But if property name contains dash, you must use different approach:
QDBusInterface *iface = new QDBusInterface(service,
path,
"org.freedesktop.DBus.Properties",
bus);
if (iface) {
if (iface->isValid()) {
QDBusReply< QVariant> r = iface->call("Get",
interface,
"property-with-dash-in-name");
int s = r.value().toInt();
}
delete iface;
}Service, path, bus, interface are same for both examples. See bug #20948 on bugs.freedesktop.org.
Přihlásit se k odběru:
Příspěvky (Atom)
