Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Problem Qt Arrow buttons change focus

    Reply
    Willem Liu | # 1 | 2011-04-30, 10:32 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Dotblank | # 2 | 2011-04-30, 15:52 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Zas | # 3 | 2011-04-30, 16:37 | Report

    Does your keyboard have two or four arrow buttons?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Willem Liu | # 4 | 2011-04-30, 22:09 | Report

    @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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Dotblank | # 5 | 2011-04-30, 23:32 | Report

    Originally Posted by Willem Liu View Post
    @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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Dotblank | # 6 | 2011-04-30, 23:35 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout