Results 1 to 4 of 4

Thread: How can i change Highlight position in Qt4 Window with navigation ( Arrows ) key ?

  1. #1
    Join Date
    Nov 2011
    Posts
    17
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How can i change Highlight position in Qt4 Window with navigation ( Arrows ) key

    Dear all,
    i have a trouble when i attempt to change my highlight position on my main Window.
    My mainwindow have 3 tabs, 1 textboxm, some button and a listview.
    Now, if i want to switch ( change highlight position ) between these objects above on my mainwindow, i'll have to use TAB button on my key board.
    Between 3 tab ( Recents, Contacts, Presentation ) , i can use Left-Right Arrow Key.
    But in situation when i'm at Contacts, i want to move highlight position down to textbox, i cannot use Down key to move down Highlight point directly to the textbox, and of course, using Tab key, i can finally move Highlight point to textbox but i have to experience the Presentation tab.
    That thing is not comfortable

    Somebody can tell me which atributte of these objects that i can edit to sastisfy this purpose of navigation contron Highlight Poing on a Qt Window.

    This is my GUI .
    cce7a4a53f4857d1276b7de16a9d9d31_37403882.aloo.jpg

    Best regards..


    Added after 39 minutes:


    i think my problem is "Tab Order".
    Does Qt default that all the tabs are arranged in sequential and if i want to move between these tabs, the only way is using Tab key and move tab-by-tab ??

    Please help me
    Last edited by duc_bkav; 2nd November 2011 at 03:27.

  2. #2
    Join Date
    Nov 2011
    Posts
    17
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How can i change Highlight position in Qt4 Window with navigation ( Arrows ) key

    can somebody help me

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How can i change Highlight position in Qt4 Window with navigation ( Arrows ) key

    I assume when you say "highlight position" you mean what the rest of the GUI world calls focus. There is an order and yes, you move through visible, active, focus-accepting widgets in order using <tab> and <shift><tab> by default, or by using the mouse. Pressing <enter> in a line edit will typically move focus to the next widget. You can define what that tab order is. This is more or less universal default behaviour and not unique to Qt. It is all spelt out in glorious detail in the documentation.

    If you want some other form of navigation, for example using cursor keys (like the tab strip does with left-right) or skipping a widget based on some other widget's content, then you need to code that.

    With a tabbed widget like yours using <tab> moves focus from the tab strip through all the widgets on the visible tab page (in the defined order) and then back to the tab strip. It will not switch to another tab page and cycle through widgets there unless you deliberately change the visible tabbed page. In light of that,
    But in situation when i'm at Contacts, i want to move highlight position down to textbox, i cannot use Down key to move down Highlight point directly to the textbox, and of course, using Tab key, i can finally move Highlight point to textbox but i have to experience the Presentation tab.
    makes no sense.

  4. The following user says thank you to ChrisW67 for this useful post:

    duc_bkav (4th November 2011)

  5. #4
    Join Date
    Nov 2011
    Posts
    17
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How can i change Highlight position in Qt4 Window with navigation ( Arrows ) key

    If you want some other form of navigation, for example using cursor keys (like the tab strip does with left-right) or skipping a widget based on some other widget's content, then you need to code that.
    Thank Chris so much,
    I see that Qt doesn't have feature to adjust the way we change the focus point as i look forward and if i want to , i have to code myself.

    Anyway, thank for your support

Similar Threads

  1. how to change the position of menu of QMainWindow
    By yxmaomao in forum Qt Programming
    Replies: 11
    Last Post: 17th September 2016, 16:12
  2. How to Change QTreeView highlight color
    By jshafferman in forum Qt Programming
    Replies: 5
    Last Post: 6th May 2011, 17:13
  3. Split tab-navigation arrows
    By homerun4711 in forum Newbie
    Replies: 0
    Last Post: 28th October 2010, 15:43
  4. QTableWidget highlight current position in header
    By lalesculiviu in forum Qt Programming
    Replies: 0
    Last Post: 27th February 2010, 19:10
  5. Replies: 3
    Last Post: 23rd November 2007, 11:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.