两个 QHeaderView 信号有什么区别?

What's the difference between two QHeaderView signals?

在 Qt 文档网站上 in QHeaderView class 我发现了两个描述相似的信号:

void QHeaderView::sectionDoubleClicked(int logicalIndex)

void QHeaderView::sectionHandleDoubleClicked(int logicalIndex)

这两者有什么区别?我应该什么时候使用第一个,什么时候使用另一个?

尽管文档字符串完全相同,

void QHeaderView::sectionDoubleClicked(int logicalIndex) This signal is emitted when a section is double-clicked. The section's logical index is specified by logicalIndex.

[signal]void QHeaderView::sectionHandleDoubleClicked(int logicalIndex) This signal is emitted when a section is double-clicked. The section's logical index is specified by logicalIndex.

信号在不同情况下发出的。来自 KDE's copy of Qt5

void QHeaderView::mouseDoubleClickEvent(QMouseEvent *e)
{
...
    int handle = d->sectionHandleAt(pos);
    if (handle > -1 && sectionResizeMode(handle) == Interactive) {
        emit sectionHandleDoubleClicked(handle);
...
    } else {
        emit sectionDoubleClicked(logicalIndexAt(e->position().toPoint()));
    }
}

不过,文档并没有特别清楚地说明“句柄”何时可能存在以及何时不存在。猜测一下,如果您的部分是可调整大小的,您可能会得到一个句柄——用于调整大小——然后您可以(双击)单击句柄或 section-body.