Hi All,
I am using QListWidget to show output ( e.g:- similar to output window you see in VS2005 IDE) .The problem I am facing is it's not updating accordingly,can anyone help me with this.
I want it to add one item each second and show the updated result , but it just shows whole list after 5 second.
void POCSleep::on_pushButton_clicked()
{
for(int i=0; i<5;i++)
{
ui.listWidget->update();
mySleep(1); /* delay of one second*/
displayMessage
(QString("Number is: %1\n").
arg( i
+1));
}
}
void POCSleep
::displayMessage(QString qmsg
) {
ui.listWidget->addItem(qmsg);
}
void POCSleep::on_pushButton_clicked()
{
for(int i=0; i<5;i++)
{
ui.listWidget->update();
mySleep(1); /* delay of one second*/
displayMessage(QString("Number is: %1\n").arg( i+1));
}
}
void POCSleep::displayMessage(QString qmsg)
{
ui.listWidget->addItem(qmsg);
}
To copy to clipboard, switch view to plain text mode
Thanks in advance.
Bookmarks