melwynfranciscarlo wrote: ↑
Thu Mar 11, 2021 2:00 am
Why is the SoLocation2Event at position [0,0] when the mouse hovers to the bottom-left of the view-area? Isn't it normally the top-left? Just wondering. Other than that, it's a cool app; especially the close button handler: didn't know you could do that in Python.
This is the case in Qt, but not in Coin world.
Kunda1 wrote: ↑
Wed Mar 10, 2021 6:42 pm
Lets do this!
Anyway guys, pushed a release candidate of the code and would like your comments : https://github.com/0penBrain/FreeCAD-ma ... og.FCMacro
The main goals were :
* Keep it below 200 lines so it has an acceptable length to be read (goal achieved if we doesn't count blank lines)
* Demonstrate how to properly set up a dialog that stays on top of FC main window
* Demonstrate how to use layouts to get a proper GUI behavior
The secondary goals that added themselves when coding :
* Demonstrate several way to communicate between class instances (callback, Qt signals, ...)
* Demonstrate subclassing of QDialog methods (accept, reject and xxxEvent)
* Show some useful Qt widget attributes
* Demonstrate basic usage of FC observers (document, selection, view)
My plan is that the code will come with a more "human" tutorial as a wiki page to more extensively explain the whys.
But any feedback regarding the code and how comments help understanding is very welcome ATM.