1

I want to built a ComboBox to select a given plotting scale out of a list or ask for a different scale (e.g. '1:625') as Textinput in the same ComboBox. The combobox is changed to 'editable' and I'm able to fill in the digits. But they are not read. The list will work fine - but how must the code looks like to insert the free choosen scale (last item)?

    self.dlg.comboBoxScale.clear()
    self.dlg.comboBoxScale.addItem('1:500', 500)
    self.dlg.comboBoxScale.addItem('1:1000', 1000)
    self.dlg.comboBoxScale.addItem('1:1500', 1500)
    self.dlg.comboBoxScale.addItem('1:2000', 2000)
    ...
    # Item with free digits
    self.dlg.comboBoxScale.addItem('1:')    #????

Any Idea?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.