[Qt-interest] Notify parent of being focused

Tom Panning lurchvt at gmail.com
Mon Apr 13 14:35:37 CEST 2009


You can either subclass QTableView, or you can use an event filter:
http://doc.trolltech.com/4.5/qobject.html#installEventFilter
For your situation, it looks like you want the QFrame subclass to
filter events for the QTableView (I'd explain the event filter more,
but the Qt Docs are better than anything I could write).

Tom

On Sun, Apr 12, 2009 at 1:49 PM, Benjamin Sonnemann
<b.sonnemann at gmail.com> wrote:
> Hi,
>
> i subclassed a QFrame and added some widgets, amongst others a QTableView.
> Now my QFrame must get notified when the QTableView is focused. The only way
> i have seen is to subclass it and reimplement focusInEvent. So, coming from
> java
> .net and MFC/WTL i am quite confused as there are "normal" events for sth
> like
> that, i wanted to ask if i have overseen sth in the documentation.
>
> Benjamin Sonnemann
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>



More information about the Qt-interest-old mailing list