[SOLVED] Remove tree view double click
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 12
- Joined: Thu Oct 14, 2021 3:34 pm
[SOLVED] Remove tree view double click
Hello Freecad forum, i need your help again:
Is there are any way to remove edit on tree view double click?
I tried to block signals from tree view but that doesn't help me...
Is there are any way to remove edit on tree view double click?
I tried to block signals from tree view but that doesn't help me...
Last edited by DenysKovalenko on Mon Nov 15, 2021 1:56 pm, edited 1 time in total.
Re: Remove tree view double click
With Python or C++?
-
- Posts: 12
- Joined: Thu Oct 14, 2021 3:34 pm
Re: Remove tree view double click
Code: Select all
class IgnoreDoubleClick(QtCore.QObject):
def eventFilter(self, obj, ev):
if ev.type() == QtCore.QEvent.MouseButtonDblClick:
return True
return False
filter = IgnoreDoubleClick()
QtWidgets.QApplication.instance().installEventFilter(filter)
Filtering double-click events only for the tree view seems a bit more difficult because the event is handled by a class QWidgetWindow instead of QTreeWidget.
Re: Remove tree view double click
Not knowing what you are after, are you aware of the new possibility in 0.20 to configure the double click?DenysKovalenko wrote: ↑Thu Nov 11, 2021 11:18 am Is there are any way to remove edit on tree view double click?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 12
- Joined: Thu Oct 14, 2021 3:34 pm
Re: Remove tree view double click
Thanks for helpwmayer wrote: ↑Thu Nov 11, 2021 1:56 pmThis will filter all double-click events not only that of the tree view.Code: Select all
class IgnoreDoubleClick(QtCore.QObject): def eventFilter(self, obj, ev): if ev.type() == QtCore.QEvent.MouseButtonDblClick: return True return False filter = IgnoreDoubleClick() QtWidgets.QApplication.instance().installEventFilter(filter)
Filtering double-click events only for the tree view seems a bit more difficult because the event is handled by a class QWidgetWindow instead of QTreeWidget.
-
- Posts: 12
- Joined: Thu Oct 14, 2021 3:34 pm
Re: Remove tree view double click
I didn't know about that, how i could configure the double click?chrisb wrote: ↑Thu Nov 11, 2021 4:04 pmNot knowing what you are after, are you aware of the new possibility in 0.20 to configure the double click?DenysKovalenko wrote: ↑Thu Nov 11, 2021 11:18 am Is there are any way to remove edit on tree view double click?
Re: Remove tree view double click
There is a new drop down icon showing the current state. Sorry, not at my computer now, cannot show a picture.DenysKovalenko wrote: ↑Mon Nov 15, 2021 1:55 pm I didn't know about that, how i could configure the double click?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: [SOLVED] Remove tree view double click
Here is the docs: Std_UserEditMode
Should this be added to the Std Base entry?
Should this be added to the Std Base entry?
Roy_043 wrote: pinged by pinger macro
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: [SOLVED] Remove tree view double click
The Std_Base page is the main page for the Std commands. But most of those commands are not listed on that page, but on dedicated pages that exist for each of the main menus. The Std_Edit_Menu command can be found on the Std_Edit_Menu page.
Note that Std_Edit_Menu defines the edit mode when an object is double-clicked in the Tree view, it does not disable double-clicks.