Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.3.4, 5.4.0
-
None
-
d67410c61560e2728396ab49b799425d29cf6f6e
Description
A model can return data for headers with the headerData() function. However, if a string is returned for StatusTipRole for this function, a status tip is not shown in the status bar.
Test case main.cpp to reproduce
===============================
#include <QtGui> int main(int argc, char *argv[]) { QApplication app(argc, argv); QMainWindow w; QTreeView tree; QStandardItemModel model(4, 2); for(int x = 0; x < model.rowCount(); ++x) { for(int y = 0; y < model.columnCount(); ++y) { QStandardItem *item = new QStandardItem(QString("item %0 %1").arg(x).arg(y)); item->setData(QString("status tip for item %0 %1").arg(x).arg(y), Qt::StatusTipRole); model.setItem(x, y, item); } } for(int i = 0; i < model.columnCount(); ++i) { model.setHeaderData(i, Qt::Horizontal, QString("column %0").arg(i)); model.setHeaderData(i, Qt::Horizontal, QString("status tip for column %0").arg(i), Qt::StatusTipRole); } tree.setModel(&model); tree.viewport()->setMouseTracking(true); w.statusBar(); w.setCentralWidget(&tree); w.show(); return app.exec(); }
Attachments
Issue Links
- relates to
-
QTBUG-68458 QHeaderView crashes if without a parent while mouse moves
-
- Closed
-
For Gerrit Dashboard: QTBUG-2066 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
104649,2 | Ensure status tips for a headerview section are handled | dev | qt/qtbase | Status: ABANDONED | +2 | 0 |
193857,11 | Ensure status tips for a headerview section are handled | dev | qt/qtbase | Status: MERGED | +2 | 0 |