[Qt-interest] How to assign keyboard shortcuts to tab close buttons
Abhishek
abhishekworld at gmail.com
Mon May 4 07:05:09 CEST 2009
Hi,
Just go through QShortcut Class
http://doc.trolltech.com/4.5/qshortcut.html
On Sat, May 2, 2009 at 3:28 PM, Maik Friedmann <
maik.friedmann at googlemail.com> wrote:
> 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
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
Abhishek Patil
"Imagination is more important than knowledge..." -Albert Einstein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090504/c8a8afe5/attachment.html
More information about the Qt-interest-old
mailing list