Results 1 to 3 of 3

Thread: QTreeWidget double click signal

  1. #1
    Join Date
    Nov 2006
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QTreeWidget double click signal

    I'm experimenting with QtreeWidget programmin on Linux with QT4.
    My problem is the following:
    I intercepted the itemDoubleClicked signal, but even if the slot I implemented is called correctly and show me a dialog like I instructed it to, still the tree widget calls the standard editing function of the item clicked.
    How can I avoid this behaviour?
    Is it possible to override the default double click action?
    Sorry if I wasn't too clear
    Thank you
    roberto

  2. #2
    Join Date
    Nov 2006
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTreeWidget double click signal

    Sorry, found it! The items were editable!
    bye everyone

    PS: and this f*ed up my reputation once and for all, I guess...

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTreeWidget double click signal

    You can make the items non-editable or change the edit triggers. For example:
    Qt Code:
    1. treeWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

Similar Threads

  1. QTreeWidget signal not working
    By Kapil in forum Newbie
    Replies: 6
    Last Post: 28th April 2006, 11:19
  2. QTreeWidget SIGNAL
    By raphaelf in forum Newbie
    Replies: 6
    Last Post: 5th March 2006, 18:35
  3. QTreeWidget and doubleClicked signal
    By becond in forum Newbie
    Replies: 1
    Last Post: 2nd March 2006, 07:16
  4. Push button double click
    By curtisw in forum Qt Programming
    Replies: 3
    Last Post: 15th February 2006, 17:40
  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.