O'Reilly logo

QGIS By Example by Daria Svidzinska, Alexander Bruy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Designer UI files in the plugin

Designing the GUI with the Qt Designer is the first part of the process. Now we need to use the previously created .ui files to construct our dialogs and implement the logic required for handling user actions, such as clicking on buttons, selecting items from lists, and so on.

Adding the About dialog to the plugin

We will start from the About dialog, as it is simple. To keep the plugin directory structure clean, we will store all the sources related to the plugin GUI in the gui subdirectory inside the plugin directory.

Open your text editor and create a new file with the following content:

( 1) import os ( 2) import ConfigParser ( 3) ( 4) from PyQt4 import uic ( 5) from PyQt4.QtCore import QUrl ( 6) from PyQt4.QtGui ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required