I think this is when you say, 'yes, business value was finally understood'.
QMouseEvent
In PyQt6
QMouseEventobjects no longer have the.pos(),.x()or.y()shorthand property methods for accessing the position of the event. You must use the.position()property to get aQPointobject and access the.x()or.y()methods on that. The.position()method is also available in PySide6.
There are other fancy feature renames/move around in packages too. Welcome to the 2020's!
(Except that not sure anyone ever asked for this change? Will anyone's life get better after this? Will we have a lot of fun? Sure... well, you can't please everyone, can you.)
UPDATE: Quite pleased to say QRegExp has been renamed to QRegularExpression. I can now update my source code for that additional reason too - was worth getting up :) <3
Feels like we're actually going somewhere no!
UPDATE2: and a hardfelt welcome goes out to QRegularExpressionValidator! Feeling spoiled now :))
UPDATE3: it seems indeed a good idea. I like how QMouseMoveEvents can now provide us QPointF positions() instead of the bad old integer QPoints under the tasteless pos() name, which then considerately cannot be passed in to helper methods on other classes. Hopefully it isn't the only case, as it's really a good idea to make large scale inconsistent design changes, which are cemented in until the next major release can hit our heads, and we're finally allowed again to make some (unusually) irresponsible updates to our source code <3
UPDATE4: maybe it's too much of good things for a day... let's leave it for now ... (remark: at least one package my project relies on lacks PySide6 support ... and not that I am overly sensitive but I was a little surprised to get QMouseWheel events in a mouseMove() method :) it might be me to blame for that, but then my Shiboken2 problems weren't gone either.)
Nincsenek megjegyzések:
Megjegyzés küldése