Download the data for this tutorial here. Unzip it to whatever folder you think is most convenient. Open Qt Designer using any of the available shortcuts in your computer. By default, Qt Designer will show the New Form dialog on opening. Choose Dialog with Buttons Bottom from. PyQt is a set of Python bindings developed for Nokia's Qt application framework. Moreover, the PyQt framework runs on all platforms supported by Qt including Mac OS X, Windows and Linux. There are two different sets of bindings: PyQt5 supports Qt v5; and the older PyQt4 supports Qt v4. We start this project in the Qt Designer in which we shall design the main form. Qt Designer is a graphical tool that is well explained with superior gui. The image of the application can be easily created and here is a result of a little more than 5 minutes work with it: Start with the Main Window form.
Latest version
Close
Close
Released:
PyQt5 Designer
Project description
Installation
Wheels for the GPL version for 32 Windows can be installed from PyPI:
Binary
site-packages/QtDesigner/designer.exesite-packages/QtDesigner/linguist.exesite-packages/QtDesigner/qml.exe
Scripts
If Python.xxScripts in your PATH environment, you can run it directly, like: designer.exe, linguist.exe, qmlview.exe
Release historyRelease notifications | RSS feed
5.14.1
5.13.2
5.13.1.1
5.13.1
5.10.1
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Qt Designer And Python
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size PyQt5Designer-5.14.1-py3-none-win32.whl (40.8 MB) | File type Wheel | Python version py3 | Upload date | Hashes |
Filename, size PyQt5Designer-5.14.1-py3-none-win_amd64.whl (40.8 MB) | File type Wheel | Python version py3 | Upload date | Hashes |
![Designer Designer](/uploads/1/2/6/6/126685554/903387665.png)
Hashes for PyQt5Designer-5.14.1-py3-none-win32.whl
Algorithm | Hash digest |
---|---|
SHA256 | 9d22b4f0f47d81859f253850f2a2d66e29011b4a380541b6a891e035a0914769 |
MD5 | 6841e63a7972837921cdf3cb6879f90a |
BLAKE2-256 | 3cc5f010b4d1f39993fefeb124df98f7b279f1a0339179f998976a5ab2e8da15 |
Hashes for PyQt5Designer-5.14.1-py3-none-win_amd64.whl
Algorithm | Hash digest |
---|---|
SHA256 | af4356b77412807d0fe4013737a9025fec3d5cd765bea4eff9a48071c25313ea |
MD5 | 4dbc1cc57aa6ce45541e57e16f1de173 |
BLAKE2-256 | ec14bd55fc528ad766a8c4f1fd45c1dff571a85c391edb4310428c654034b814 |
Qt For Python
Quick start guide¶
The following quick start guide will introduce you to Qt Designer basics. Itwill show how to create a simple custom feature form for a vector layer in QGIS.
-
Download the data for this tutorial
here
. Unzip it to whatever folder you think ismost convenient. -
Open Qt Designer using any of the available shortcuts in your computer.By default, Qt Designer will show the New Form dialog on opening.
-
Choose
DialogwithButtonsBottom
from the templateformslist and press Create. -
Have a quick look into the Qt Designer‘s graphical user interface (GUI):
- In the middle of the screen, you will find the recently created newdialog, a blank form with only a pair of ok-cancel buttons (1).
- On the right-hand side of the screen you will find theWidget box which lists all available widgets (2). This listcan be used to insert widgets by simply dragging and dropping them ontop of the dialog.
- In the left-hand side (among others) there’s the PropertyEditor (3), that can be used to edit the properties of the dialog itselfor of each inserted widgets.
- Finally, in the top, near the menus, you will find the Formstoolbar(4), which we will use to impose some alignment layout forconsistency purposes.
How to recognize dmg for windows 7. NoteIn Mac OS X, Qt Designer starts up in Multiple Top-Level Windowsmode by default, looking very different from what is presented above. Tochange it, you should go to Designer ‣ Preferences..and chooseDockedWindow
in the User Interface Mode.To see what widgets we want to use on the new form, we will need to inspectthe data’s attributes and the layer’s current feature form. -
Open QGIS by using any of the available shortcuts in your computer.
-
Click the Add Vector layers button in the Manage layersToolbar (or use the Layer ‣ Add Layer ‣ Add VectorLayer..) to browse to the
events.shp
shapefile location. (see QGISQuick start guide if you need help with this task) -
Right-click the recently loaded layer’s name in the Layerspanel and choose the option Open attribute table. Then, takesome time noticing the layer’s field names and types.
-
Let’s now have a look at the layer’s current feature form. Go back to QGISmain window, select the events layer and click Toggle editingin the digitising toolbar (if not visible check View ‣Toolbars ‣ Digitizing toolbar). In the same toolbar, select theAdd Feature tool and click anywhere in the map canvas to add anew point to your layer. This step should insert a point in the map canvasand show the default layer’s feature form. Take some time analysing thefeature form and then press Cancel to discard any changes.Let’s go back to Qt Designer and add the necessary widgets for the firstfield: name.
-
We will start by adding a text label to our form. Scroll down theWidget box to locate the Label widget in theDisplay widgets group. Now, drag and drop it on the form. You can changethe label’s text either by double-clicking label itself and typing or usingthe Property Editor, more precisely at the Textproperty. Set the value to
Event'sname
. If necessary, expand thelabel box using the small squares in its border. -
Now let’s add an input widget for the name field. This time, instead ofscrolling down the Widget box to locate the widget, try typing
lineedit
on the filter bar at the top of it. Drag and drop aLine edit widget to be right below of the label. -
Repeat steps 7 and 8, for the venue field (or just select both existingwidgets pressing the
Ctrl
key, and copy (Ctrl+c
) and paste(Ctrl+v
). UseEvent'svenue
for the label, and put bothLabel and Line edit widgets below the other two. -
Finally, let’s add some special QGIS input widgets and respective labelsto control the date fields. Using any of the two options described in steps7 and 8, find and insert two QgsDateTimeEdit widgets. Put themside by side, and above them add the labels Start date and End date.Your form should look similar to the one in the following figure:
To connect this dialog’s input widgets to the QGIS layer’s fields, we need toset their objectName property’s value with the same name as thetarget field. As you will see, this can be done in several different ways.
-
Select the Name of eventLine edit and in theProperty Editor set the value of the objectNameproperty to
name
. -
Right-click the Venue of the eventLine edit, and chooseChange objectName. Set the value to have the name of the secondfield:
venue
. -
For QgsDateTimeEdit widgets simply use the ObjectInspector located above the Property Editor. Double-click ontheir current names and change them to
start_date
andend_date
By now, all your input widgets should have the name of the correspondingfields, and in the Object Inspector you should have somethingsimilar to the next figure.We are almost finished. All we need to do now is align all widgets so thatthey look good together. For that, we will use a grid layout. -
Right-click anywhere on the dialog’s empty space (this will switch anyfocus over the widgets to the dialog instead) and chooselayout ‣ Layout in a grid (or use the toolbar). Afterthat, all widgets should be aligned according to their relative place toeach others.After you have applied the grid layout, you can now resize the form tomake it more compact, by click and move the bottom-left-corner of the form.
-
Finally, using File ‣ Save as. let’s save the formusing a suggestive name, for instance
events_form.ui
. For easydiscovery, save it in the same folder that the data is located. Nito installer for apple tv 2 mac download.Now, let’s go back to QGIS and test the feature form in action. -
In QGIS, right-click the layer’s name in the Layers panel andchoose Properties. Go to the Fields tab and in theAttribute editor layout select the
Provideui-file
option.Then, in the Edit UI browse to the events_form.ui location.Finally, press Ok to apply the changes and close the layer’sproperties dialog. -
Assuming that the events layer is still in editing mode, let’s use theAdd feature again to create a new point in the map canvas. Thistime, it should open the customised feature form created in Qt designerwith all its widgets.To finish our feature form, let’s make a small fix in the date fieldsotherwise the values won’t be saved in the table because of the use ofdifferent date formats in Qt form and QGIS.
-
Back in Qt Designer, select the two QgsDateTimeEdit widgets(Hold the
Ctrl
key while clicking) and, in the PropertiesEditor set the Display format value toyyyy-M-dd
and checkthe calendarPopup property. The changes will be applied onboth widgets. Save the form again. -
Back in QGIS, go to the fields tab in the Properties menu and for eachdate field change the widget to date/time. Make sure to use the same dateformat value in the Widget display as the one used in the form(
yyyy-MM-dd
). Also select the calendar popup andallow NULL options. Press Ok when you have finished. https://millyellow.weebly.com/amplitube-3-mac-os-x-download.html. -
Now, repeat step #17 to see the feature form changes take effect. The datevalues should be represented differently and a new icon will alow to choosethe date from a popup calendar. Besides, saving the input to the tablewill now work fine.
A lot more form customizations can be done using Qt Designer. You can usemany different widgets, organise the widgets in groups or tabs, and you caneven add some Python logic to make your forms responsive.