From c354c381d1c921a3b939ba27f22bc5c54723fc35 Mon Sep 17 00:00:00 2001 From: Suzanne Soy Date: Tue, 17 Aug 2021 02:10:38 +0100 Subject: [PATCH] SearchTools crashes FreeCAD (different crash) --- SearchTools/SearchTools.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/SearchTools/SearchTools.py b/SearchTools/SearchTools.py index e714124..6474641 100644 --- a/SearchTools/SearchTools.py +++ b/SearchTools/SearchTools.py @@ -15,12 +15,12 @@ if True: lsv = QtGui.QListView() sim = QtGui.QStandardItemModel() - flt = QtCore.QSortFilterProxyModel() - flt.setSourceModel(sim) - flt.setFilterCaseSensitivity(QtCore.Qt.CaseSensitivity.CaseInsensitive) - sea.textChanged.connect(flt.setFilterWildcard) + #flt = QtCore.QSortFilterProxyModel() + #flt.setSourceModel(sim) + #flt.setFilterCaseSensitivity(QtCore.Qt.CaseSensitivity.CaseInsensitive) + #sea.textChanged.connect(flt.setFilterWildcard) # make the QListView non-editable - lsv.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) + #lsv.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) #lsv.setModel(flt) #lay.addWidget(lsv) @@ -33,6 +33,12 @@ if True: qom = QtGui.QCompleter() qom.setModel(sim) qom.setPopup(lsv) + qom.setParent(le) + def onChanged(x): + print(x) + lsv.show() + #qom.complete() + le.textChanged.connect(onChanged) all_tbs = set() for wbname, workbench in Gui.listWorkbenches().items():