I've this code ... stripped a bit
Qt Code:
  1. void testform::keyPressEvent(QKeyEvent *event)
  2. {
  3. switch (event->key())
  4. {
  5. case Qt::Key_4 :
  6. if (!demo_started)
  7. {
  8. this->buttons[0]->setPixmap(QPixmap::fromImage(images[1]));
  9. this->listener = new PortListener(portName);
  10.  
  11. // So, connect to listener, and ... all happy :P
  12. connect(this->listener,SIGNAL(packet_received(data_answer)),
  13. this,SLOT(packet_received(data_answer)));
  14.  
  15. }
  16. else
  17. {
  18. this->buttons[0]->setPixmap(QPixmap::fromImage(images[0]));
  19. this->killTimer(demo_timer_id)
  20. }
  21. demo_started = !demo_started;
  22. break;
  23. ...................................
  24. default : QWidget::keyPressEvent(event);
  25. }
  26. }
To copy to clipboard, switch view to plain text mode 

and receiver SLOT:
Qt Code:
  1. void testform::packet_received(data_answer answer)
  2. {
  3. qDebug() << "pewpew all dead !";
  4. redrawUI();
  5. }
To copy to clipboard, switch view to plain text mode 

Problem is that this slot called only when I move mouse,press key etc. But signal itself emmited every 0.5 seconds (read data from com-port). Listener class is quite stable and works as intended.