Results 1 to 3 of 3

Thread: QListView tab focus for second row

  1. #1
    Join Date
    Dec 2009
    Posts
    14
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Unhappy QListView tab focus for second row

    Hi,

    In my application I am using QListview in icon mode and in the list view the 0th row is hidden i.e setRowHidden.And now the actual problem is when i press the tab key the tab focus is not coming to this listview (may be beacause of 0th row is hidden).
    Somebody please help me to resolve this issue.

    thanks....

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QListView tab focus for second row

    Did you try with icon unhidden ?
    Also where does the focus go ? and without seeing what code you have done, we might not be able to say much

  3. #3
    Join Date
    Dec 2009
    Posts
    14
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QListView tab focus for second row

    Thanks for the reply..

    Actually I am using setRowHidden(0,true); to hide the 0th row.This application also having 2 radio buttons, and 2 pushbuttons at the top and one label to show the 0th row item.The list is created as follows,

    list->setViewMode(QListView::IconMode);
    list->setWrapping(false);
    list->setFlow(QListView::LeftToRight);
    list->setSpacing(5);
    list->setMovement(QListView::Static);
    list->setHorizontalScrollMode(QAbstractItemView::Scroll PerItem);
    list->setFrameShape(QFrame::NoFrame);
    list->setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOff);


    and also using setItemDelegate .In this delegate I am just placing the text in the right side of the image instead of bottom.

    Now initially the tab focus is on radio buttons, then to the push button.Then if again press the tab I don't knowwhere s this focus goes..!! .But if unhide the 0th row , focus goes to this 0th row of list.

    One more thing I cant use setCurrentIndex of 1st row to move the highlight on this row.Because contents & behaviour of the label , radiobutton and button depends on the current index i.e 0.

    Hope you understand my problem !

Similar Threads

  1. Window focus issues (How to force focus to a window?)
    By montylee in forum Qt Programming
    Replies: 3
    Last Post: 25th April 2009, 01:00
  2. focus
    By hgedek in forum Newbie
    Replies: 3
    Last Post: 25th December 2007, 19:14
  3. Focus issues / Setting multiple focus
    By ComputerPhreak in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2007, 06:09
  4. Focus Help please
    By munna in forum Qt Programming
    Replies: 3
    Last Post: 15th November 2006, 18:09
  5. Keeping focus at bottom of QListView
    By jakamph in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2006, 14:45

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.