-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QQuickWidget support #8
Comments
Hi, In your solution. I found an issue, so that the quickitem is never found. It must be:
instead of: It would be great, if all this code, could be merged from the maintainers into spix! Best Regards |
I am generally open to seeing a pull request for this. However there are two things that might make this a bit more complicated than just copy pasting this code over:
|
I would also like to see Spix support for GUI projects using widgets instead of QML (e.g. no QML at all). I'm less concerned with sending QEvents ... my use case for testing is to be able to get widget properties for testing purposes in an ecosystem much simpler than the full-blown commercial alternatives (for complexity reasons). e.g. what size is the widget? what coordinates is the widget? what displayed text does the widget have? exists? Perhaps access to QApplication::allWidgets inside the AUT would allow such access. Should this be a separate feature request? |
@J-PREZORS It's ok to keep it here and not as a separate feature request. In general Spix is designed to support any kind of GUI framework by implementing different "Scene" objects. I hope I find some time to write some docs about its design which would hopefully make extending it easier... |
Do you guys consider adding support for qml running in widgets? We use
QMainWindow
withQQuickWidget
as a central widget for a couple of reasons and so far Spix cannot automate such applications.After some digging I ended up with a working version with just a few lines of code, so maybe you can add that? You will need to add
Qt5::Widgets
andQt5::QuickWidgets
to the project, then add a widget-searching function:that you call in
QQuickItem* getQQuickItemAtPath(const spix::ItemPath& path)
in its "nothing found" branch:finally, it needs two includes at the top:
as you would probably make widget support optional, I am not sure if I can submit a proper pull request that takes this into account, but you are very welcome to add the code above to the project, so I can use the original version.
Thank you :)
The text was updated successfully, but these errors were encountered: