Hiding the test runner window
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Hiding the test runner window
While the tests are running using the Test WB, sometimes the runner window seems to be getting hidden/occluded/whatever -- how is that done? I'm still trying to get testing of copy and paste working, and I think the events are going to the test runner window instead of the main 3D view. I'm hoping if I actually hide the runner window that will stop.
Re: Hiding the test runner window
I've wondered about this too!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Hiding the test runner window
if it's a qtwidget shouldn't it have a show/hide function?
Re: Hiding the test runner window
Yeah, but how does a running test get at the widget? Do I have to get the list of windows from the QCoreApplication and iterate over it, or something along those lines?
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Hiding the test runner window
This might (or might not) work:
Code: Select all
Gui.getMainWindow().setFocus()
Re: Hiding the test runner window
No luck, I think because the test runner window is modal.
Re: Hiding the test runner window
No, it's non-modal.You can easily see this when opening the test dialog but not starting the tests. Then you can still interact with the main window by opening the menus, ....No luck, I think because the test runner window is modal.
Here I already explained why directly calling the Copy & Paste commands do not give the expected result.
Now when you create a spreadsheet and open the test dialog (or any non-modal dialog) you will see that the Copy & Paste commands are greyed out. In order to make them active again a way is to switch to another application and then back to FreeCAD.
This as a regression of RT's changes of the Link branch where a timer to regularly (200 ms) update all command actions has been replaced to update them on request. There are still a couple of use cases where the commands are not updated when needed.
Now the whole thing is very fragile in order to be tested with unit tests and I recommend to avoid to use the general Copy & Paste command and instead send the messages directly to the correct window.
Re: Hiding the test runner window
Thanks, I will take that approach then.