1

as stand in the OP title, is there any chance to get an indeterminate QProgressBar indide a QListWidget?

    bar = new QProgressBar();   
    bar->setMinimum(0);
    bar->setMaximum(0);
    QListWidgetItem *item = new QListWidgetItem ;
    list->setItemWidget(item, bar);
    list->setCurrentRow(0);

that's what I tried but it displays nothing? Any hint?

thank you:

EDIT: I need to wait results from a long term procedure and I want to show the results inside the QListWidget

Blackbelt
  • 156,034
  • 29
  • 297
  • 305

1 Answers1

1

Set the parent of ProgressBar to list.

Instead of bar = new QProgressBar();

Use bar = new QProgressBar(list);

That would do.

ScarCode
  • 3,074
  • 3
  • 19
  • 32
  • Thank you for your reply. When I recive the first item from my long term procedure, I want to remove the QProgressBar and add the item. I tried the QListWidget::removeItemWidget(item), but bar is still there. Any hint? – Blackbelt Jul 31 '12 at 11:44
  • For removing the item, you have to delete the item. so do "delete bar" when you wish to remove the itemwidget. Qt Documentation says so.. – ScarCode Jul 31 '12 at 11:57
  • Could you please point me out the link where the doc says so? +1 anyway – Blackbelt Jul 31 '12 at 12:02