[QGIS-Developer] Bridging FreeCAD and QGIS

Luigi Pirelli luipir at gmail.com
Fri May 19 06:50:50 PDT 2017


great to hear this :). Nyall do you mind to share this on freecad threads ?
Luigi Pirelli

**************************************************************************************************
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Mastering QGIS 2nd Edition:
* https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
**************************************************************************************************


On 19 May 2017 at 01:49, Nyall Dawson <nyall.dawson at gmail.com> wrote:
> On 12 May 2017 at 07:34, Luigi Pirelli <luipir at gmail.com> wrote:
>> FYI in freeCAD list
>>
>> https://forum.freecadweb.org/viewtopic.php?t=22390
>
> This is quite encouraging to read. I'd love to see stronger links
> between our projects. I suspect there's a lot we can share - even if
> it's just sharing all the custom widgets both projects have had to
> develop/refine!
>
> On this note, we spoke at the Australian hackfest about how we can
> make QGIS play nicer with other projects. We've got the issue right
> now that QgsApplication is a QApplication, so it's currently
> impossible to import the qgis libraries into another Qt project
> without creating this forced Q(gs)Application.
>
> This should change - so we came up with the idea of splitting up the
> current QgsApplication class, into:
>
> - QgsCore. A singleton (yep!) containing all the various other "single
> instance members" which are currently attached to QgsApplication. E.g.
> task manager, provider registries, etc. This approach was recently
> taken with the construction of a QgsGui singleton containing global
> GUI members.
> - Move all the various path handling code out to their own class.
> - Create a QApplication in main, instead of creating a QgsApplication.
> Standalone scripts would need to do the same - construct their own
> Q(Core/Gui)Application, just like standalone PyQt scripts require.
> - Kill the need to manually call initQgis, by handling this
> automatically when the qgis python libraries are imported.
>
> Benefits would be:
> - much easier use of qgis python libraries in standalone scripts
> (especially with Nathan's great work in
> https://github.com/qgis/QGIS/commit/df679a2). On Windows this would
> then be as simple as: setup python path correctly - import qgis.core -
> done.
> - QGIS libraries can be used safely with any other Qt based code which
> handles its own Q(Core/Gui)Application creation.
>
> Of course... this was just planning ahead... I don't think anyone's
> actively working on this yet ;)
>
> Nyall


More information about the QGIS-Developer mailing list