2

I can see the source code of the core QGIS plugins from the repository in github. But is there any repository of source codes for QGIS toolbars also?

  • Perhaps this might help: github.com/qgis/QGIS/blob/master/src/gui/qgisinterface.h – Joseph Jan 29 '15 at 11:54
  • The above link helps somewhat but still whether GUI's in QGIS are being developed only by C++? Source code in python would help me much better. – User123 Jan 29 '15 at 12:05
  • Hopefully others can advise on this issue as it is beyond my scope :) – Joseph Jan 29 '15 at 12:09
1

If you mean QGIS default toolbars, well, those are written in C++ and you can find their creation and configuration here (C++ file) and here (Qt4 UI file). All actions (buttons) inside QGIS toolbars are written in C++ (except by plugin buttons) and you can find them in the QGIS source code as well.

If you want to get a reference of a QGIS toolbar in Python, you should use the iface object (instance of QgisInterface), which exposes QGIS toolbars. For example, have a look at How to customize the QGIS GUI using Python?, where I explain how to customize the QGIS GUI (menus and toolbars) via Python.

  • Thank you for your response. I had got an enough idea from the link. – User123 Jan 29 '15 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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