[Qt-interest] Key Press event for Table Widget
yogesh upreti
yogesh.upreti at gmail.com
Mon Jun 14 08:13:14 CEST 2010
Hallo Luis,
Thanks for reply.
I understood how to do it for a custom class [ AnyClass::keyPressEvent() ],
but I did't understand how to do it for a TableWidget in my ui (created
using Nokia Qt-Creator) ?
Do you mean I have to create a custom widget using QTableWidget as base and
Introduce that in my ui? Is direct subclassing of QTableWidget will be
possible? Can you tell me where to find correct procudure in Documentation?
Thanks :)
- Yogesh
Date: Sun, 13 Jun 2010 18:20:32 -0300
From: Luis Lezcano Airaldi <luislezcair at gmail.com>
Subject: Re: [Qt-interest] Key Press event for Table Widget
To: qt-interest at trolltech.com
Message-ID: <4C154BA0.1060303 at gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
El 13/06/10 16:36, yogesh upreti escribi?:
> Hallo All,
> I want to know how to handle the Keyboard Key Press event for a
> QTableWidgt?
> I have a Table and I want to delete selected rows using Delete key.
>
> Can someone guide me where to find it?
>
> Thanks
> Yogesh Upreti
Hi, you have to subclass QTableWidget and reimplement the
keyPressEvent() function.
Take a look at the QWidget documentation.
Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100614/0ddd783e/attachment.html
More information about the Qt-interest-old
mailing list