Results 1 to 5 of 5

Thread: how to use listView enevt

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Posts
    35
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Android

    Default how to use listView enevt

    i use a listView
    i select one line, is there have any event ?
    if selection changed , is it can emit any event ?
    how to use it ?

    i find i function

    Qt Code:
    1. void QAbstractItemView::selectionChanged ( const QItemSelection & selected, const QItemSelection & deselected ) [virtual protected slot]
    To copy to clipboard, switch view to plain text mode 

    This slot is called when the selection is changed. The previous selection (which may be empty), is specified by deselected, and the new selection by selected.

    See also setSelection().

    but, it's don't work..

    my code

    Qt Code:
    1. void MusicSettingsWidget::selectionChanged ( const QItemSelection & selected, const QItemSelection & deselected )
    2. {
    3. qDebug()<<"selection changed !";
    4. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by tsuibin; 15th October 2009 at 06:54.

Similar Threads

  1. listview
    By addu in forum Qt Programming
    Replies: 2
    Last Post: 11th May 2009, 12:05
  2. Editing directly in a ListView!
    By Humble in forum Qt Programming
    Replies: 2
    Last Post: 29th August 2007, 08:37
  3. How to return elements from a ListView
    By nikau in forum Newbie
    Replies: 1
    Last Post: 23rd January 2007, 07:44
  4. ListView Dynamic Popup menu
    By raphaelf in forum Newbie
    Replies: 3
    Last Post: 14th October 2006, 19:26
  5. filtering big listview causes slowdown
    By soul_rebel in forum KDE Forum
    Replies: 1
    Last Post: 24th May 2006, 13:31

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.