I am new using QGIS plugins. I used QtDesigner to build a plugin window with some buttons. But when I open this plugin in QGIS all the formatting is gone. Any idea what is happening?
-
1Do you have also installed 'Reload Plugin'? Did you remember to save previously in QtDesigner any changes before reloading and launching plugin in QGIS ?– xunilkCommented Mar 22, 2020 at 18:07
-
@xunilk yes, I have Reload Plugin installed. Also, I have saved the changes before reloading plugin in QGIS. I can resize the window on QGIS but the "Choose an item" label always appear with missing text.– AnaCommented Mar 22, 2020 at 18:16
-
I have a similar issue when I produce plugins in Linux and they are exported to Windows? What is your operating system and QGIS version?– xunilkCommented Mar 22, 2020 at 18:20
-
@xunilk I am working on Windows and QGIS version is 3.10.0.– AnaCommented Mar 22, 2020 at 18:22
-
Update to 3.12 version (3.10.0 is a version with known bugs) and test if problem still persist.– xunilkCommented Mar 22, 2020 at 18:27
1 Answer
Could be a resizing issue?
You'll need to set your objects into layouts and sometimes add spacers to ensure what you see in the Qt Designer is the same in QGIS. This also ensures when the window is resized it doesn't mess with your formatting.
If you set your QDialog Class to grid layout just right click in the Object Inspector and change with Lay out>
Set the comboBox and label as horizontal layout. Within the dialog Click on label then Ctrl+Click on the comboBox to select both of them together, then right click and set layout.