'imageSource property is unavailable on Squish IDE?
I would like to know if an image is green or red in a button I test with Squish.
My problem is that the imageSource property of my Qt object button is blank in Squish IDE so I don't know if it displays a green image or a red image.
Anyone knows how to fix this ?
It seems that if I don't have this property I can't test the color of my button with Squish since there isn't any other information in my Qt object to find out the color.
Solution 1:[1]
The imageSource property may be a QUrl (a "complex object"). The IDE does not always support "converting" that into a string representation, or expanding such a property shown in the "Variables" view.
But when you assign imageSource to a variable...
# Example quickcontrols2/wearable:
startApplication('wearable')
o = waitForObject({"container": {"type": "QQuickApplicationWindow"}, "id": "homeButton", "type": "NaviButton"})
# Look at "imageSource" in "Variables" view", it can
# be expanded now:
imageSource = o.imageSource
# Log "path" component of imageSource:
test.log("o.imageSource.path: %s" % o.imageSource.path)
...then you can expand and further inspect it in the "Variables" view.
But you can also pick the object and then inspect the imageSource and its components in the "Application Objects" view, too.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | frog.ca |
