1

I am exporting a map with qgis2web with popups. I have seen that I can make attributes and their labels show up on the popups. The problem is that I want to add a custom widget I created in QT designer.

I have used in QGIS "layer">"properties">"Attributes Form" and then "Provide ui-file" to create a point with my widget, but when I export it with qgis2web the popup appears blank.

I am exporting as OpenLayers, not Leaflet.

1 Answer 1

2

Custom UI files are not supported in qgis2web, I'm afraid. Instead, you will have to recreate the functionality of your UI file in Javascript, and patch that into your exported map.

In your case, amending Openlayers popups, you need to look at ./resources/qgis2web.js for the default popup code. Search for the variable popupText. There are four code blocks, which handle each combination of clustered/unclustered and popups on hover/popups on click.

2
  • I can't seem to find in where I should patch it into and modify the popup interface, I have looked in different files but I am stumped. Would you know which .js file I should look into? or which folder? eg: "layers", "resources", "resources"... Thanks!
    – Bandidot
    Commented May 28, 2020 at 18:10
  • I've updated my answer with specific details - hope it helps. Commented May 29, 2020 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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