Hi,
I have a function like below
void Class Name::stop()
{
port->write(p);
port->close();
}
void Class Name::stop()
{
QByteArray p("A008@");
port->open(QIODevice::ReadWrite);
port->write(p);
port->close();
}
To copy to clipboard, switch view to plain text mode
when i cal the function directly(like this stop(),The data is going to port and that will be collected at the other end.
But the problem is when i call like below,
connect(timer, SIGNAL(timeout()), this, SLOT(stop()));
timer->start(1000);
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(stop()));
timer->start(1000);
To copy to clipboard, switch view to plain text mode
nothing is going from the port,am not able to collect the data at other end.
What is the problem with that above code?
can anybody help me on this issue
thanks a lot.
Bookmarks