I want to display a MessageBox / Dialog with text "Hello World" for 2 seconds and then the message box must exit automatically without any user interaction.
I tried with the following code but is not working. I still get an OK button which i have to press inorder to close the messagebox.
QString lString("HelloWorld");
QMessageBox lMessage(QMessageBox::Information, QString("HelloWorld"), (lString), MessageBox::NoButton, this);
lMessage.setStyleSheet("background: gray");
lMessage.exec();
Thanks in advance for the answer.



