문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top