Results 1 to 2 of 2

Thread: how to move between columns in tree view?

  1. #1
    Join Date
    Jan 2007
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how to move between columns in tree view?

    How do I enable the user moving between the columns in a QTreeView? I'm using a QStandardItemModel with 2 columns, and each item is a QStandardItem. If I do a

    setSelectionBehavior( QAbstractItemView::SelectItems )

    the right arrow key does an expand-tree and the tab key (which is enabled) moves to the next row.

    I want the user to enter some data in the first column and then be moved (or be able to move) to the second. How do I do this?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how to move between columns in tree view?

    I think you can do that by reimplementing the key event handler for the view (using an eventFilter for example).

Similar Threads

  1. Ignore mouse events out of tree view
    By krishna.bv in forum Qt Programming
    Replies: 3
    Last Post: 27th December 2006, 11:24
  2. Model, View and Proxy
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 21st November 2006, 08:50
  3. how to display full tree item name on mouse move ?
    By rajesh in forum Qt Programming
    Replies: 5
    Last Post: 15th November 2006, 08:41
  4. problem with tree view
    By boss_bhat in forum Newbie
    Replies: 4
    Last Post: 4th June 2006, 21:03
  5. tree view!!
    By Seema Rao in forum Qt Programming
    Replies: 4
    Last Post: 9th May 2006, 14:09

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.