c++ - QObject connect QSystemDeviceInfo::Profile to QVariant -



c++ - QObject connect QSystemDeviceInfo::Profile to QVariant -

i have qml part of application needs know state i'm in. currentprofilechanged function has signal giving me qsystemdeviceinfo::profile want convert qvaraint qml can understand profile number between 0 , 7, function:

qobject::connect(deviceinfo, signal(currentprofilechanged(qsystemdeviceinfo::profile)), rootobject, slot(changepower(qvariant(qsystemdeviceinfo::profile))));

gives unusual error:

[qt message] object::connect: no such slot qdeclarativeitem_qml_3::changepower(qvariant(qsystemdeviceinfo::profile)) in c:/users/gerhard/qtprojects/raker/main.cpp:142

what doing wrong here?

if seek this:

qobject::connect(deviceinfo, signal(currentprofilechanged(qsystemdeviceinfo::profile)), rootobject, slot(changepower(qvariant(qsystemdeviceinfo::profile))));

it says this:

[qt message] object::connect: no such slot qdeclarativeitem_qml_3::changepower(qsystemdeviceinfo::profile) in c:/users/gerhard/qtprojects/raker/main.cpp:142

if alter or both qvariant complains incompatible arguments.

the slot function cannot have parameter doesn't match parameter in signal. slot should specified ..slot(changepower(qsystemdeviceinfo::profile))..

c++ qt profile qml signals-slots

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -