Hi all,

I have been creating a new library for having QGIS custom widgets available in Qt Designer, see PR 1325 [0].

I am facing a problem regarding the included file name that is defined in the custom widget and used by uic to create the code for it [1].

The problem is that this file won't be the same if the UI will be compiled from python or from c++. For example, QgsMapLayerComboBoxPlugin [2], would need to include qgsmaplayercombobox.h [3] for c++ while it waits for qgis.gui for Python.

Does someone has any idea if it would be possible to make the widget librabry working for both languages?

The non-optimal solutions I see:
* provide two libraries, one for python and one for c++
* add a setting in cmake to choose to compile custom widgets for C++ or for python
* choose one by default and let the user change in source the included file

I think that all of these are non satisfying and removes all the magic from this new feature.
If you have any lead, it's more than welcome.

Cheers,

Denis

[0] https://github.com/qgis/QGIS/pull/1325
[1] http://qt-project.org/doc/qt-4.8/qdesignercustomwidgetinterface.html#includeFile
[2] https://github.com/qgis/QGIS/pull/1325/files#diff-15
[3] http://qgis.org/api/classQgsMapLayerComboBox.html
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to