Realization of signal and slot
Code:
bh = new BluetoothHandler();
connect(this, &PlayerControl::connectToDevice, bh, &BluetoothHandler::connectToSocket);
void connectToDevice(QBluetoothAddress address);
void BluetoothHandler::connectToSocket(QBluetoothAddres s address);
address is nowhere initialized. I wonder, which address would be after this connect?
Re: Realization of signal and slot
Quote:
Originally Posted by
Blitzor DDD
[CODE]
address is nowhere initialized. I wonder, which address would be after this connect?
Well, the place in "this" that emits the signal will have to take care of passing a valid object to the signal when emitting it.
Since QBluetoothAddress is a class, just creating an instance of it will create an initialiized object, so the emit cannot be called without a valid and initialized "address"
Cheers,
_