I have just switched from Qt 4 to Qt 5.5 and found out that the behaviour of QTimer is different. When the session is automatically locked after 10 minutes of idle (Xubuntu / Light Locker) QTimer stops working and my application also stops working until the session is unlocked and the desktop appears.

I have tested the behaviour with this small app:
Qt Code:
  1. MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
  2. {
  3. ui->setupUi(this);
  4.  
  5. QTimer *timer = new QTimer(this);
  6. connect(timer, SIGNAL(timeout()), this, SLOT(update()));
  7. timer->start(1000);
  8. }
  9.  
  10. void MainWindow::update(){
  11. ui->textEdit->append(QTime::currentTime().toString("hh:mm:ss"));
  12. }
To copy to clipboard, switch view to plain text mode 

And the timer stops after the session is locked:
13:43:01
13:43:02
13:43:03 <-- Session locked
13:43:36 <-- Session unlocked
13:43:37

Is this a bug or new feature? Qt 4.x works fine but Qt 5.5 do not. Is there a way to workaround this behaviour because my application also stop working while the session / screen is locked?