Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
最终,我进入 Qt 的源代码进行绘制事件,假设他们需要实际位置,并且他们使用sectionViewportPosition(),它给出了相对于 QTableWidget/QTableView 左上角的实际部分位置。
sectionViewportPosition()
您可以使用它mapToGlobal()来获取该部分的全局水平位置。
mapToGlobal()