From e900855ea3bf3af883f258cb02829d6e3b726830 Mon Sep 17 00:00:00 2001 From: Suzanne Soy Date: Tue, 17 Aug 2021 01:57:05 +0100 Subject: [PATCH] SearchTools crashes FreeCAD --- SearchTools/SearchTools.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/SearchTools/SearchTools.py b/SearchTools/SearchTools.py index 5bced34..e714124 100644 --- a/SearchTools/SearchTools.py +++ b/SearchTools/SearchTools.py @@ -3,8 +3,8 @@ if True: mw = Gui.getMainWindow() mdi = mw.findChild(QtGui.QMdiArea) - mw.findChildren(QtGui.QToolBar, 'XternalApplications') - mw.findChildren(QtGui.QToolBar, 'XternalApplications')[0] + #mw.findChildren(QtGui.QToolBar, 'XternalApplications') + #mw.findChildren(QtGui.QToolBar, 'XternalApplications')[0] wdg = QtGui.QWidget() lay = QtGui.QGridLayout(wdg) @@ -21,12 +21,19 @@ if True: sea.textChanged.connect(flt.setFilterWildcard) # make the QListView non-editable lsv.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) - lsv.setModel(flt) - lay.addWidget(lsv) + #lsv.setModel(flt) + #lay.addWidget(lsv) mwx.setCentralWidget(wdg) mdi.addSubWindow(mwx) + xap = mw.findChildren(QtGui.QToolBar, 'XternalApplications')[0] + le = QtGui.QLineEdit() + xap.addWidget(le) + qom = QtGui.QCompleter() + qom.setModel(sim) + qom.setPopup(lsv) + all_tbs = set() for wbname, workbench in Gui.listWorkbenches().items(): try: