Home > Back-end >  How to function Pointers in the QT slot?
How to function Pointers in the QT slot?

Time:03-24

Now I write a serial class, in the hope that in the constructor introduced from outside a function, then readyRead signal and the function of the serial port connected, excuse me how should do to achieve this goal? Here is the part of the code I wrote, but complains, it is for god to solve!

 
The class SerialPort
{
Public:
SerialPort (void *) pf ());
Void FFF (*) (void);
QSerialPort * m_Port;
}

SerialPort: : SerialPort (void *) pf ())
{
FFF=pf;
QObject: : connect (this - & gt; M_Port, & amp; QIODevice: : readyRead, this, FFF);
}

  • Related