Questions tagged [pyqt5]

Python bindings for Qt5

27 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
24 views

How to use all QGIS 3 custom widgets in Qt Designer?

For example, QGIS 3.4 has various custom widgets such as QgsFieldValuesLineEdit and QgsColorWheel (and later versions have even more widgets) but they are not listed in the QGIS custom widgets list of ...
4
votes
0answers
41 views

PyQGIS: What objects need to be destroyed in a custom expression

I'm using a custom (PyQGIS) function in expressions to make little detailed minimaps around each feature in a layer, and store it in the layer (gpkg) as a png. My code works but makes QGIS (3.12) ...
4
votes
0answers
137 views

QGIS 3: Set custom project variables with input dialog

I am using QGIS 3.10.0 and Windows 10. I have a project where I want the user to define custom project variables. I want to make this user friendly, I don't want the user to need to open the project ...
3
votes
0answers
65 views

QGIS configuration: Import Style Libary

I would like to script QGIS to import a style library as part as a configuration for a new user. By Python commands, how do I instruct QGIS to do what a QGIS user can do with the "Import Items" ...
3
votes
0answers
187 views

QGisPlugin : Trigger closeEvent by clicking 'X' in QgsAttributeForm

This is the code: def formOpen(dialog, layer, feature): """Function called when a connec is identified in the map""" global feature_dialog # Create class to manage Feature Form interaction ...
2
votes
0answers
61 views

Delayed function calling inside QgsTask

I try to add a function to the qt event loop via QTimer.singleShot(...) from within a QgsTask. However the function is never executed. I wrote a short script that isolates this issue: import time ...
2
votes
0answers
336 views

QGIS 3 Value Relation current_value() not working in custom ui form

I have a custom UI form made with Qt Designer with a couple of dropdown list, so I can easily edit a layer. I use a Value Relation on those fields to filter the displayed data. The problem is the ...
1
vote
0answers
34 views

How to use nested for loop to iterate over features of a layer?

I have a shapefile having features with duplicate IDs. I want to merge features with same IDs and take average of values of other field which are different. How is it possible in python in QGIS3? ...
1
vote
0answers
28 views

Connect QgsMapTool to PyQt Application

I am trying to initialise my DrawPolygonMapTool within my application once the DrawPolygonButton is enabled. When the relevant button is pushed, it does run the __init__ function in my ...
1
vote
0answers
49 views

how to access Canvas mouse point on action of button from another window Pyqt5

I am PyQt5 and PyQgis novice. Below code snippet is my main window application. Below code throw a main Window with QGsMapCanvas as central widget as canvas, which displays maps. On menu action and i ...
1
vote
0answers
98 views

How to fill a field with comboBox.currentText()

Basically, I want to create a widget plugin (QGIS 3.x) in which any user can choose a standard text from a combo box and, after press a ok button, enable a layer for editing and calls the add feature ...
1
vote
0answers
22 views

Getting HTML-Values in a QGIS-form by pyQT5

I have created a form for point-objects, that is delivering some values (getting by a database-connection) in the "html-area" in the form. So far the form works well and I´m getting the values that I ...
1
vote
0answers
25 views

How to pull in and push out text browser?

I am using Qt designer to create a plugin in Qgis3. I want to add description of a tool beside the tool. For this I have tried using 'Text Browser' by connecting it with button. I am able to hide and ...
1
vote
0answers
70 views

Convert QDialog Plugin to QDockWidget

I have a QGIS 3 plugin that is in QDialog. Everything is functional but i want to change it to QDockWidget and dock it within QGIS. How can i convert it to QDockWidget? I am using QGIS 3 with Pyqt5. ...
1
vote
0answers
106 views

PyQGIS (3.4) and PyQt5 DLL error

I have installed the new version os QGIS(3.4) on my computer. I am working in a standalone application of PyQGIS so I need to load PyQt5 components. As a difference with previous versions when I try ...
1
vote
0answers
37 views

QGIS (maptool) Plugin Crashes on some computers

I developed a custom Plugin which inherits from QGIS MapTool.The plugin has user interfaces and can add features to the map based on a GUI. The Plugin works Fine on some computer(when they installed ...
1
vote
0answers
479 views

Custom Attributes form in QGIS 3

I'm trying to customize feature form with ui file, I followed https://nathanw.net/2011/09/05/qgis-tips-custom-feature-forms-with-python-logic/1 but the attributes values still null when I added ...
1
vote
0answers
42 views

How to merge polygons to get coordinates of final shape?

I have list of plots numbers that should be merged into multipolygon. As a result I have to get coordinates of final shape (as multipolygon). That is may code: # work only on layer "plots" name = ...
1
vote
0answers
1k views

Use PyQtGraph by using QtDesigner

I want to create and display a graph on Main Window which I designed in QtDesigner. These plot graph values are taken from table widget, it is not problem. Main problem is here, what I use to show the ...
1
vote
0answers
361 views

QGIS3 error Python on launch, Ubuntu 16.4

I installed QGIS3 on ubuntu 16.4. When I launch QGIS I get an error: Impossible de charger PyQt. (Can't load PyQt) Le support Python va être désactivé. (Python support will be deactivate) ...
1
vote
0answers
868 views

How to create a dialog built in Qt Designer from a QGIS dockwidget

I am building my first python QGIS plugin, which all I want to do is to have a dockwidget that can instantiate a dialog box which I built using qt designer. I built a simple dialog box inside qt ...
0
votes
0answers
28 views

I can't load a CSVv file inside a QTableWidget by Python code

I am a beginner of PyQGIS and I'm trying to do a QGIS plugin, with QGIS 3.4.7 and PyCharm 2016.3.6. I already did the "dialog" box on Qt and after I wrote on Pycharm. It is a table only with the ...
0
votes
0answers
25 views

Get width of vertical QHeaderView

How can I get the actual width of the vertical header in a QHeaderView. In the docs I can only find the function sectionSize(). But the docs says: 'Returns the width (or height for vertical headers) ...
0
votes
0answers
57 views

QtDesigner is not starting for qgis bat file

The qt-designer.bat file did not launch the QtDesigner. I have tried the file available with OSGeo4W64 installation but the qt-designer did not starts.I also try to start the qtdesigner from the ...
0
votes
0answers
95 views

Couldn't load plugin 'openlayers_plugin' due to missing 'QtWebKitWidgets'

I am using Qgis 3.8 and I am trying to use the plugin OpenLayers. However, when I try to install the plugin I receive the following error: Couldn't load plugin 'openlayers_plugin' due to an error ...
0
votes
0answers
99 views

pyinstaller3.4 package of pyqgis 3.7 standalone program failed import qgis.core due to missing PyQt5.QtPrintSupport

I have a qgis standalone program that is develop with python3.7/pyqt5.11 that come with the OSGEO4W's QGIS 3.4.4 (the latest LTR), it has the following imports: import os, sys import sip from PyQt5 ...
0
votes
0answers
24 views

Find diagram for understanding pyqgis

In orther to undestand the api of pyqgis, i'd like to konw where can i find a diagram of pyqgis api ?