File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change 55
55
56
56
from Orange .widgets .utils import encodings
57
57
from Orange .widgets .utils .overlay import OverlayWidget
58
+ from Orange .widgets .utils .combobox import TextEditCombo
58
59
59
60
60
61
__all__ = ["ColumnType" , "RowSpec" , "CSVOptionsWidget" , "CSVImportWidget" ]
@@ -233,27 +234,6 @@ def minimumSizeHint(self):
233
234
return super (LineEdit , self ).sizeHint ()
234
235
235
236
236
- class TextEditCombo (QComboBox ):
237
- def text (self ):
238
- # type: () -> str
239
- """
240
- Return the current text.
241
- """
242
- return self .itemText (self .currentIndex ())
243
-
244
- def setText (self , text ):
245
- # type: (str) -> None
246
- """
247
- Set `text` as the current text (adding it to the model if necessary).
248
- """
249
- idx = self .findData (text , Qt .EditRole , Qt .MatchExactly )
250
- if idx != - 1 :
251
- self .setCurrentIndex (idx )
252
- else :
253
- self .addItem (text )
254
- self .setCurrentIndex (self .count () - 1 )
255
-
256
-
257
237
class CSVOptionsWidget (QWidget ):
258
238
"""
259
239
A widget presenting common CSV options.
You can’t perform that action at this time.
0 commit comments