Results 1 to 3 of 3

Thread: persistentEditor in QTreeWidget

  1. #1
    Join Date
    Apr 2007
    Location
    Moscow, Russia
    Posts
    20
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default persistentEditor in QTreeWidget

    Hello!

    My application works with QTreeWidget. The new element adds to the tree by pressing a button. How can I put keyboard cursor into persistentEditor for the new element?

    For example:

    void XMLTree::buttonAddPushed()
    {
    QTreeWidgetItem *item = new QTreeWidgetItem;
    openPersistentEditor( item, 0 );
    // ??? How can I put keyboard cursor in this editor ???
    }

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: persistentEditor in QTreeWidget

    Call edit() on the item.

  3. The following user says thank you to wysota for this useful post:

    adhit (22nd April 2007)

  4. #3
    Join Date
    Apr 2007
    Location
    Moscow, Russia
    Posts
    20
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: persistentEditor in QTreeWidget

    wysota, thank you!
    That's real work!!!

Similar Threads

  1. Removing items properly from qtreewidget item
    By Djony in forum Qt Programming
    Replies: 6
    Last Post: 21st November 2006, 12:20
  2. resizing a QTreeWidget
    By drhex in forum Qt Programming
    Replies: 6
    Last Post: 27th October 2006, 22:32
  3. QTreeWidget & QListWidget different selection
    By munna in forum Qt Programming
    Replies: 9
    Last Post: 21st July 2006, 06:50
  4. QTreeWidget problem!!
    By mcenatie in forum Qt Programming
    Replies: 2
    Last Post: 10th March 2006, 11:47
  5. few questions related to QTreeWidget
    By prakash in forum Qt Programming
    Replies: 9
    Last Post: 10th March 2006, 07:32

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
  •  
Qt is a trademark of The Qt Company.