Results 1 to 2 of 2

Thread: Editing QTreeWidgetItems (PyQt4)

  1. #1
    Join Date
    Jul 2010
    United States
    Qt products
    Unix/X11 Windows

    Default Editing QTreeWidgetItems (PyQt4)

    I am having a hard time correctly editing a QTreeWidgetItem when setting the item to edit mode. What is the correct way to do this. I would like to make it editable and when the user enters text and presses enter then the item changes its name. If the user presses the escape key then all changes are ignored and the name goes back to the original name. I appreciate any help.

  2. #2
    Join Date
    Jul 2009
    Enschede, Netherlands
    Thanked 69 Times in 67 Posts
    Qt products
    Unix/X11 Windows

    Default Re: Editing QTreeWidgetItems (PyQt4)

    Add the Qt.ItemIsEditable flag to the item flags. The other behavior is implemented by the QTreeView and its delegate.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

Similar Threads

  1. Creating gaps between QTreeWidgetItems
    By ChiliPalmer in forum Qt Programming
    Replies: 4
    Last Post: 27th September 2009, 18:03
  2. 64-bit PyQt4 on Mac?
    By keflavich in forum Installation and Deployment
    Replies: 0
    Last Post: 4th July 2009, 02:25
  3. Need Help for PyQt4
    By JAIDEEP KANDELWAL in forum Qt Programming
    Replies: 0
    Last Post: 23rd April 2009, 00:08
  4. Replies: 1
    Last Post: 21st November 2008, 17:06
  5. Replies: 5
    Last Post: 18th July 2006, 23:31


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.