networkSignalStrengthChanged is a signal. You need to create a slot function to connect it to, in order to receive the notifications.
in your header:
Code:
private slots:
void receivedSignalStrength(QSystemnetworkInfo:NetworkMode, int);
in your implementation:
Code:
void receivedSignalStrength(QSystemnetworkInfo:NetworkMode whichMode, int strength)
{
switch whichMode {
case WlanMode:
qDebug() << "wifi strength changed" << strength;
break;
};
}
then somewhere else connect it up:
Code:
connect(&red2, SIGNAL(networkSignalStrengthChanged(QSystemnetworkInfo:NetworkMode, int)),
this,SLOT(receivedSignalStrength(QSystemnetworkInfo:NetworkMode, int)));
More on signals and slots:
http://doc.trolltech.com/4.6/signalsandslots.html
If you just want the current signal strength of the connected wifi network you can do:
Code:
int strength = red2.networkSignalStrength(QSystemNetworkInfo::WlanMode);