Results 1 to 3 of 3

Thread: treemodel double click should open getOpenFileName instead of edit the field, how?

  1. #1
    Join Date
    Jul 2009
    Posts
    92
    Thanks
    7
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default treemodel double click should open getOpenFileName instead of edit the field, how?

    I have a treemodel implemented where I can edit the fields, basically copied the Qt example. How can I call getOpenFileName when I double click on a field, instead of editing the field? I don't know where to look?
    thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: treemodel double click should open getOpenFileName instead of edit the field, how

    look for edit triggers and signals. Disable the first and with the second "call" a custom slot where you call getOpenFileName.

  3. #3
    Join Date
    Jul 2009
    Posts
    92
    Thanks
    7
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: treemodel double click should open getOpenFileName instead of edit the field, how

    thanks, this worked. I was attempting to change something in the model instead of in the view!

Similar Threads

  1. Double Click Capturing
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 8th January 2011, 15:12
  2. Replies: 6
    Last Post: 5th June 2009, 10:38
  3. Replies: 2
    Last Post: 12th January 2009, 00:24
  4. QGraphicsScene Click / Double Click
    By philentropist in forum Qt Programming
    Replies: 1
    Last Post: 9th February 2007, 05:32
  5. Replies: 5
    Last Post: 12th January 2006, 16:40

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.