Results 1 to 2 of 2

Thread: How to pass FileInfo object instead of model index when Item selected in treeview ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2009
    Location
    Bangalore
    Posts
    21
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default How to pass FileInfo object instead of model index when Item selected in treeview ?

    I have one treeView and one widget in my main UI, which is promoted to myTreeView and myWidget respectively. Now I connecting these two widgets by..

    Qt Code:
    1. connect(ui->treeView,SIGNAL(clicked(QModelIndex)),ui->widget, SLOT(UpdateDetails()));
    To copy to clipboard, switch view to plain text mode 

    myTreeView uses FileSystemModel, so here I want to pass FileInfo object of the selected item to myWidget::UpdateDetails slot, instead of model index. Could some one tell me how to do this ?

  2. The following user says thank you to prady for this useful post:


Similar Threads

  1. Replies: 1
    Last Post: 23rd December 2011, 08:30
  2. Replies: 1
    Last Post: 4th August 2011, 22:36
  3. Replies: 2
    Last Post: 4th December 2010, 08:09
  4. Connect button and pass QListView current index
    By been_1990 in forum Qt Programming
    Replies: 3
    Last Post: 30th November 2009, 16:20
  5. How to get parent of selected item in TreeView?
    By RavenS in forum Qt Programming
    Replies: 2
    Last Post: 7th March 2009, 13:27

Tags for this Thread

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.