SearchTools crashes FreeCAD (different crash)

This commit is contained in:
Suzanne Soy 2021-08-17 02:10:38 +01:00
parent e900855ea3
commit c354c381d1

View File

@ -15,12 +15,12 @@ if True:
lsv = QtGui.QListView() lsv = QtGui.QListView()
sim = QtGui.QStandardItemModel() sim = QtGui.QStandardItemModel()
flt = QtCore.QSortFilterProxyModel() #flt = QtCore.QSortFilterProxyModel()
flt.setSourceModel(sim) #flt.setSourceModel(sim)
flt.setFilterCaseSensitivity(QtCore.Qt.CaseSensitivity.CaseInsensitive) #flt.setFilterCaseSensitivity(QtCore.Qt.CaseSensitivity.CaseInsensitive)
sea.textChanged.connect(flt.setFilterWildcard) #sea.textChanged.connect(flt.setFilterWildcard)
# make the QListView non-editable # make the QListView non-editable
lsv.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) #lsv.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
#lsv.setModel(flt) #lsv.setModel(flt)
#lay.addWidget(lsv) #lay.addWidget(lsv)
@ -33,6 +33,12 @@ if True:
qom = QtGui.QCompleter() qom = QtGui.QCompleter()
qom.setModel(sim) qom.setModel(sim)
qom.setPopup(lsv) qom.setPopup(lsv)
qom.setParent(le)
def onChanged(x):
print(x)
lsv.show()
#qom.complete()
le.textChanged.connect(onChanged)
all_tbs = set() all_tbs = set()
for wbname, workbench in Gui.listWorkbenches().items(): for wbname, workbench in Gui.listWorkbenches().items():