I'd like to detect a double click in a QToolBar. Basically, I'm using a QToolBar/QActionGroup/QAction combination to create graphical tabs in my application. I'd like to perform an action when one of these "tabs" is double clicked.
Any ideas?
I'd like to detect a double click in a QToolBar. Basically, I'm using a QToolBar/QActionGroup/QAction combination to create graphical tabs in my application. I'd like to perform an action when one of these "tabs" is double clicked.
Any ideas?
Why not use tool buttons instead of actions?
That way you can easily detect when they are double clicked.
But if you really want to use QActions then you can intercept double clicks on the toolbar and see if a QAction is at that position, by connecting to its triggered signal.
Toolbar actions are tool buttons. To me it sounds weird to have double clickable buttons. Isn't it a bit unintuitive?
J-P Nurmi
I suggested a tool button because, being a QAbstractButton, he could easily reimplement mouse events for it and detect double clicks.
Who knows...?To me it sounds weird to have double clickable buttons. Isn't it a bit unintuitive?
Maybe he paints them differently so they don't have a "pushed" state and give the impression of a tab.
Maybe plain, old widgets are better.
Last edited by sdfisher; 8th October 2007 at 06:27.
Bookmarks