maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Problem Qt Arrow buttons change focus (https://talk.maemo.org/showthread.php?t=72649)

Willem Liu 2011-04-30 10:32

Problem Qt Arrow buttons change focus
 
Hi community,

I've been searching everywhere for an answer, but I couldn't find any.

My problem is as follows.

I have a user interface created with Qt Creator and there are a few line edit components in it. I would expect the arrow buttons to work as native Maemo applications, namely that it would change the focus, but I can't seem to get the same result. The arrow buttons do nothing but navigate the cursor in the line edit field. Up and down do nothing at all and I would expect that that would cause a focus change to the next or previous line edit component.

Does someone know what I'm doing wrong here?

Many thanks in advance.

Regards,

Willem Liu

Dotblank 2011-04-30 15:52

Re: Problem Qt Arrow buttons change focus
 
I am slightly confused by the 'arrow buttons' you mention. Is it the keys on the keyboard?

You may be able to install an event filter and handle the button presses yourself.

Zas 2011-04-30 16:37

Re: Problem Qt Arrow buttons change focus
 
Does your keyboard have two or four arrow buttons?

Willem Liu 2011-04-30 22:09

Re: Problem Qt Arrow buttons change focus
 
@Dotblank

Yes, the arrow buttons on the keyboard.

@Zas

I have 4 arrow buttons: up, down, left, right.

So there is no other solution than to handle the events myself? I would've thought it was OS functionality.

Dotblank 2011-04-30 23:32

Re: Problem Qt Arrow buttons change focus
 
Quote:

Originally Posted by Willem Liu (Post 998014)
@Dotblank

Yes, the arrow buttons on the keyboard.

@Zas

I have 4 arrow buttons: up, down, left, right.

So there is no other solution than to handle the events myself? I would've thought it was OS functionality.

On the desktop computer the up/down between input fields is usually handled by using tab. I think the term that applies to this type of thing is called "accelerators". I actually am not sure how tab functionality is handled on maemo

Dotblank 2011-04-30 23:35

Re: Problem Qt Arrow buttons change focus
 
Here is some explanation of qt and window focus:

http://cartan.cas.suffolk.edu/qtdocs/focus.html

Hope it helps but you may have already read it


All times are GMT. The time now is 10:46.

vBulletin® Version 3.8.8