-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
4.8.2
-
None
-
Ubuntu 10.04 32-bit
The example below can be used to reproduce the issue:
void
createTreeWidget(bool showBug)
{
QTreeWidget *tw = new QTreeWidget();
QTreeWidgetItem *hdr = new QTreeWidgetItem();
hdr->setText(0,QLatin1String("Column-1"));
hdr->setText(1,QLatin1String("Column-2"));
tw->setHeaderItem(hdr);
tw->setRootIsDecorated(false);
if (!showBug)
{
tw->setSortingEnabled(true);
}
tw->header()->resizeSections(QHeaderView::ResizeToContents);
if (showBug)
{
tw->setSortingEnabled(true);
}
tw->show();
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
createTreeWidget(true);
createTreeWidget(false);
return app.exec();
}
If tw->header()->resizeSections(QHeaderView::ResizeToContents); is called before the sorting is enabled, the sorting arrow is drawn over the header text
- relates to
-
QTBUG-135338 Sorting indicator size not honored in itemview header with windows11 style
-
- Closed
-