2

I would like to use a QGIS custom widget in a UI window on Qt Designer for Mac. I only have the Qt widgets and cannot find a way to see the QGIS widgets.

I have Mac OS Mojave 10.14.6, Qt Creator 4.11 (based on Qt 5.14.1), Qt Designer 5.9.6, QGIS 3.10 and of course python 3, Qt, PyQt.

I already saw the answers on No custom widgets in Qt Designer for QGIS 3 but:

  • Most answers apply to MS-Windows. Thus I have no .exe or .bat with the designer. I cannot find a similar designer executable in the QGIS Mac package.

  • The promote of http://www.informit.com/articles/article.aspx?p=1405227&seqNum=3 works of course, but I don't benefit from the custom properties of the widget. It is not very convenient to define them in the code.

  • The plugin approach of http://www.informit.com/articles/article.aspx?p=1405227&seqNum=3 is ways too complicated ... and I expect that QGIS did it already, seeing the designer for MS-Windows.

  • I try to add some path in Qt Designer preferences (template paths) to /Applications/QGIS3.10.app/Contents/Frameworks/QtDesigner.framework/ and several paths within. Similar in the Qt Creator preferences (Designer > model paths).

What am I missing? How to get it?

2
  • 1
    Did this ever get a solution? I am running into the same issue when trying to use QgsMapLayerCombobox.
    – anon1234
    Commented Nov 25, 2020 at 15:44
  • not that I know... I make without :-(
    – Florian H.
    Commented Jan 2, 2021 at 13:59

1 Answer 1

4

Go to Application and "show package content" of QGIS package. You can open the shipped designer executable in /Applications/QGIS-LTR.app/Contents/MacOS/bin/ and double click "designer" (running this from the command line might not work). You should have all the widgets in the widget box

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.