Hi, I have the next code, as far as I've seen, pretty similar to the normal usage of QTimer.

Qt Code:
  1. QTimer* pAuxTimer = new QTimer();
  2. pAuxTimer->setSingleShot(true);
  3. QSignalMapper* mapper = new QSignalMapper();
  4. connect(pAuxTimer, SIGNAL(timeout()), mapper, SLOT(map()));
  5. connect(mapper, SIGNAL(mapped(QWidget*)), this, SLOT(showTranspAdvertisement(QWidget*)));
  6. mapper->setMapping(pAuxTimer, pAuxWid);
  7. pAuxTimer->start(50);
To copy to clipboard, switch view to plain text mode 

It works fine, but it creates a memory leak because that's the end of the function. I can use a non local variable because the code is executed when the user presses a button, so I don't know how many times is gonne be executed, I don't know how many timers I'm gonna have working at the same time...

Does Qt eliminate them automatically? docs says nothing about that.

thansk!