Results 1 to 2 of 2

Thread: QTreeWidget::setCurrentItem ( QTreeWidgetItem * item )

  1. #1
    Join Date
    Jan 2008
    Location
    Davao City, Philippines
    Posts
    77
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QTreeWidget::setCurrentItem ( QTreeWidgetItem * item )

    Hello!

    I have tried in a simple QTreeWidget, created with Qt-Designer, with

    Qt Code:
    1. treeWidget->setCurrentItem( previous );
    To copy to clipboard, switch view to plain text mode 

    to jump to a specific Entry called 'Banken' in this case. It works, but after doing that all items between the old one and the new one are marked like selected.




    But they are not, because
    Qt Code:
    1. QList<QTreeWidgetItem *> QTreeWidget::selectedItems () const
    To copy to clipboard, switch view to plain text mode 
    returns a QList where size = 1.


    I have tried it with QT-4.7.3 (Linux/OpenSource). I can't try an older version because I am using some new functions from Qt-4.7.

    Any ideas what's going wrong here?

    Thanks in advance.

    Guenther
    DavaoSOFT, the home of ERPel
    ERPel, das deutsche Warenwirtschaftssystem fuer LINUX
    http://www.davaosoft.com

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTreeWidget::setCurrentItem ( QTreeWidgetItem * item )

    Sorry, you will need to provide more details for us to be able to help you.

    i) have you set any properties?
    ii) which (of the QTreeView's) signals have you connected to?
    iii) please show the complete code (at least the lines interacting with the treeview)
    iv) ideally: something that compiles

Similar Threads

  1. Replies: 2
    Last Post: 18th January 2011, 05:12
  2. Unable to remove QTreeWidgetItem row from Qtreewidget
    By moh.gup@gmail.com in forum Qt Programming
    Replies: 2
    Last Post: 1st December 2010, 05:40
  3. Replies: 7
    Last Post: 19th October 2010, 08:32
  4. Customizing QTreeWidget and QTreeWidgetItem
    By mots_g in forum Qt Programming
    Replies: 0
    Last Post: 18th August 2010, 06:53
  5. Replies: 2
    Last Post: 24th May 2009, 10:27

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.