Tag Info

New answers tagged

0

The layer creation option separator should be helpful, i.e. SEPARATOR=TAB Based on the QgsVectorFileWriter.writeAsVectorFormat docs, this should do it (untested): QgsVectorFileWriter.writeAsVectorFormat(inputLayer, "D:/dstest/my_csv", "CP1250", None, "CSV", True, 0, "SEPARATOR=TAB")


1

As you can run your code (open a custom GP Tool) from within python window, then you toolbox path and its tool are ok. It can be a problem with your config.xml. Check this file and look for the button and make sure the Class and id of the button are set to ButtonClass1. e.g: <Button caption="GPToolDialog" category="Test Python Addin" ...


0

I actually tried, based on TJ's suggestion in a comment, just setting setting self.editable=True for the first combo box. This change allowed the selection to remain visible in the first box. I wouldn't have thought that as my first choice, because I don't really need it to be editable (no reason for users to type anything in the box). But then again, it ...


1

I didn't test, but noticed you aren't using the 'value' property to set the combobox text box value (the displayed value) after the item selection (onSelChange). Notice the 'value' property documented here and notice the 'refresh' method use recommended in conjunction with the change in property: ...


0

Because here you have the wrong line. def onSelChange(self, selection): **combobox.enabled = True** Because [combobox] is not defined.You delete this line, should be able to run. Of course, you need to change ComboBoxClass1's self.enabled to True. As far as I know, in the toolbar's comboBox to achieve another seems more difficult to control, if you ...



Top 50 recent answers are included