[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Keyboard Focus in KDatePicker
From: Ellis Whitehead <kde () ellisw ! net>
Date: 2002-04-24 12:57:44
[Download RAW message or body]
Hi Arni,
You have a couple possibilities.
1) use QAccel in the main window to make the arrow keys into shortcuts.
2) subclass QLineEdit; override keyPressEvent(); check if an arrow key
was pressed, and if it was, do what's need to navigate the calendar
instead of passing the key to QLineEdit::keyPressEvent().
Cheers,
Ellis
On Wednesday 24 April 2002 07:04, Arni Ingimundarson wrote:
> Hello,
>
> KDatePicker now (3.0) supports keyboard input to change the date (i.e.
> up,down,left,right to select day). You can also enter the date
> directly in a QLineEdit field.
>
> Now the problem is that when QLineEdit has keyboard-focus you cant use
> the arrow keys to select the date. For example the
> clock-kicker-widget: if you click on the clock, the kdatepicker widget
> popsup but QLineEdit has keyboard focus to start with so you either
> have to click on the table or use TAP to change focus.
>
> Is there an easy way for a widget to intercept (key)events and only
> pass them on if it doesn't need them. In other words, is there a way
> to send arrow-key-events to KDateTbl even if QLineEdit has keyFocus?
>
> Regards,
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic