Results 1 to 2 of 2

Thread: How to navigate between widget?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2012
    Posts
    12

    Question How to navigate between widget?

    Hi all,

    I have a question on qtwebkit. Suppose that I turn on spatial navigation and I open a window.
    The focus is setting on address bar, when I press left, I cannot move the focus out of the address bar.
    What I want is that the focus can focus on icon which is located on the left of address bar.
    Do you have any advise?

    Regards,
    Horoma

  2. #2
    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 to navigate between widget?

    The "address bar" and other navigation widgets are not provided by QtWebKit.

    My first piece of advice: don't do things in your UI that would not normally happen on the platform(s) you are targeting. I cannot recall any normal UI where pressing left with the cursor at the left end of a line edit would change the widget focus to an unrelated widget. An example I could think of where this might be desirable is if you have four separate text edits for the four components of an IPv4 address: but these are not unrelated widgets.

    If you really want to do this then you could try overriding the line edit's keyReleaseEvent(), check if the key is Qt::Key_Left and the cursorPosition() is zero, then call setFocus() on the widget to the left.

Similar Threads

  1. Navigate two files
    By srimanta12 in forum Design Patterns in Qt
    Replies: 2
    Last Post: 21st March 2010, 07:51
  2. Navigate between QWidgets and MainWindow
    By pcaeiro in forum Qt Programming
    Replies: 2
    Last Post: 5th August 2009, 12:05
  3. Navigate through QTableWidget
    By darshan.hardas in forum Qt Programming
    Replies: 1
    Last Post: 17th December 2008, 15:03
  4. TableView navigate signal/event
    By skuda in forum Qt Programming
    Replies: 2
    Last Post: 25th January 2008, 15:52
  5. Navigate through qlistview items with shortcuts
    By jiveaxe in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 11:28

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
  •  
Qt is a trademark of The Qt Company.