With header QTreeView::mapToGlobal returns an unexpected value
Solved
General and Desktop
-
Env
- OS: Linux
- Qt: 6.2.0
Problem
If
QtreeView
has no header,QTreeView::mapToGlobal
returns the expected value.
IfQtreeView
has a header,QTreeView::mapToGlobal
returns an unexpected value, if plus it with the height of the header, it'll be as expected.More Info
Post with the same issue in 2011: https://forum.qt.io/topic/3747/qtreeview-maptoglobal-is-this-considered-a-bug
-
@eyllanesc said in With header QTreeView::mapToGlobal returns an unexpected value:
try with: view.viewport()->mapToGlobal(...).
It works, but why?
Thanks