0

I'm trying to stretch QProgressBar to fill with QTableWidgetItem, I have not found any solution about this, do anyone know how? Thanks!

...
ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
...
QProgressBar *bar = new QProgressBar(ui->tableWidget);
ui->tableWidget->setCellWidget(0, 0, bar);

What should I do to make QProgressBar to fit on QTableWidgetItem? My problem is related to this.

Viv
  • 17,170
  • 4
  • 51
  • 71
user2399415
  • 207
  • 2
  • 3
  • 8

1 Answers1

0

If I understand your problem correctly, that blank area is where the % value will go. You can hide it with bar->setTextVisible(false). You can also try to change its position with stylesheets.

thuga
  • 12,601
  • 42
  • 52