-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.0
-
None
-
f9b11bcf786eb3ab189f0402fd1b0f023910c2df
QHeaderView crashed if without a parent.
+++ src/widgets/itemviews/qheaderview.cpp
@@ -2530,8 +2530,20 @@ void QHeaderView::mouseMoveEvent(QMouseEvent *e)
if (handle != -1 && (sectionResizeMode(handle) == Interactive)) {
if (!hasCursor)
setCursor(d->orientation == Qt::Horizontal ? Qt::SplitHCursor : Qt::SplitVCursor);
- } else if (hasCursor) {
- unsetCursor();
+ } else {
+ if (hasCursor)
+ unsetCursor();
+#ifndef QT_NO_STATUSTIP
+ int logical = logicalIndexAt(pos);
+ QString statusTip;
+ if (logical != -1)
+ statusTip = d->model->headerData(logical, d->orientation, Qt::StatusTipRole).toString();
+ if (d->shouldClearStatusTip || !statusTip.isEmpty()) {
+ QStatusTipEvent tip(statusTip);
+ {{{{!!!QCoreApplication::sendEvent(d->parent, &tip); !!!!}}}
+ d->shouldClearStatusTip = !statusTip.isEmpty();
+ }
+#endif // !QT_NO_STATUSTIP
{{!!! line is where segment faults !!!!}
- relates to
-
QTBUG-2066 Status tips are not shown for QHeaderView
-
- Closed
-