Yes, your code in comment #7 has the line as a pointer, that is fine.
But instead of modifying that line, you are modifying an object return by one of its getters, an object that is discarded immediately afterwards (it is a temporary object).
You write
line->line().setP1(mCenter);
line->line().setP1(mCenter);
To copy to clipboard, switch view to plain text mode
which is equivalent to
a.setP1(mCenter);
QLineF a = line->line();
a.setP1(mCenter);
To copy to clipboard, switch view to plain text mode
How do you expect "line" to move when you are not changing its values?
You need to change the data your "line" has access to, not some copy of that data.
Cheers,
_
Bookmarks