[Qt-interest] How to assign keyboard shortcuts to tab close buttons
Maik Friedmann
maik.friedmann at googlemail.com
Sat May 2 11:58:20 CEST 2009
Hello,
I've been using Qt 4.5 and enhanced QTabWidget features. I have an
application whose main widget is a QTabWidget. It is set to
documentMode and each tab has a close button. It is working perfectly,
but I need to assign keyboard shortcuts to those close buttons
(specifically Ctrl+W), similar to Firefox. I failed to do this; I
tried to create a global QAction, tried to get a reference to close
button with tabWidget->tabBar()->tabButton(idx) and assign a shortcut
to it without success.
Any idea how to implement this?
Regards,
Maik
More information about the Qt-interest-old
mailing list