object.globalBounds
ScreenRectangle object.globalBounds(object)
This function takes an object
reference (as returned by the Object findObject(objectName) function or by the Object waitForObject(objectOrName) function), and returns the bounding rectangle for the object in screen coordinates as a ScreenRectangle.
These values are identical to what Squish uses during object highlight. The values may however not be identical to toolkit specific geometry information since Squish may further limit the global bounding rectangle to what is really visible on screen (i.e. if parts of an object are clipped away by one of its parent objects).
var obj = waitForObject(":MyWidget"); var rect = object.globalBounds(obj); test.verify(rect.width > 200);
y $obj = waitForObject(":MyWidget"); my $rect = object::globalBounds($obj); test::verify($rect->width > 200);
obj = waitForObject(":MyWidget") rect = object.globalBounds(obj) test.verify(rect.width > 200)
obj = waitForObject(":MyWidget") rect = Squish::Object.globalBounds(obj) Test.verify(rect.width > 200)
set obj [waitForObject ":MyWidget"] set rect [object globalBounds $obj] test verify [expr [property get $rect width] > 200]
© 2024 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.