1

Developing a plugin with Qt Designer for QGIS 2.14.1-Essen on Windows 7 and having trouble inserting the QgsCollapsibleGroupBox widget. I receive the following error:

ImportError: No module named qgscollapsiblegroupbox

I put from qgis.gui import QgsCollapsibleGroupBox into my main.py file but it still doesn't recognise it. Only post I found which mentioned this error is QGIS custom widgets with python plugins but not exactly sure how to install this qgis_customwidgets.py file.

I would like this plugin to be transferred to other computers but would like to avoid having to install this file each time (if it is indeed required).

Is there another way to use this type of widget or perhaps a method to save the qgis_customwidgets.py into my plugin directory and just call the module?

Joseph
  • 75,746
  • 7
  • 171
  • 282
  • Strange, I use the same version of QGIS. Just gave it a try and there is no problem with the QgsCollapsibleGroupBox from Qt Designer. I didn't have to import anything, although I had installed libqgis-customwidgets v.2.14.1 from the repository before. – Germán Carrillo May 04 '16 at 13:45
  • @GermánCarrillo - I use Windows 7, I'm not sure how to access this libqgis-customwidgets v.2.14.1 as most of the information I found online refers using a Linux system. – Joseph May 05 '16 at 12:00
  • 1
    Did you already try this solution? http://gis.stackexchange.com/questions/164111/my-plugins-crashes-with-no-module-named-qgsprojectionselectionwidget-in-window – Germán Carrillo May 05 '16 at 12:51
  • @GermánCarrillo - Hmm guess I missed that post, thanks! Will take a look :) – Joseph May 05 '16 at 12:58
  • @GermánCarrillo - Yup, that worked! If you post the solution using qgscollapsiblegroupbox and perhaps a generic description on how to do this for other widgets, I will accept it? I can also change the title so that it is more generic which hopefully makes it easier to search for. – Joseph May 05 '16 at 13:05
  • 1
    I don't think there's a need for a new answer. I'll just mark the post as duplicated to guide new users to the answer. BTW, great that it solves your issue. – Germán Carrillo May 05 '16 at 13:23

0 Answers0