Results 1 to 2 of 2

Thread: problem in QTreewidget

  1. #1
    Join Date
    Nov 2006
    Location
    gurgaon
    Posts
    49
    Thanks
    12
    Qt products
    Qt4
    Platforms
    MacOS X

    Question problem in QTreewidget

    hi all
    i have small problem in tree widget
    i want to select only single mode for treewidget as like listview have (ListVew->setSelectionMode(ListView::single))

    is there any way for tree widget means in treewidget if i search for item particular that only selected in tree widget

    and futher i wannna use clearSelection() for tree widget
    as i had used in listView(ListView->clearSelection())


    plz ell me the solution as soon as possible
    thanks & regards
    --------------------
    jyoti

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

    Default Re: problem in QTreewidget

    Quote Originally Posted by jyoti View Post
    i have small problem in tree widget
    i want to select only single mode for treewidget as like listview have (ListVew->setSelectionMode(ListView::single))

    is there any way for tree widget means in treewidget if i search for item particular that only selected in tree widget

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

    Quote Originally Posted by jyoti View Post
    and futher i wannna use clearSelection() for tree widget
    as i had used in listView(ListView->clearSelection())

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

    Edit: It shouldn't be that hard to search the docs. For example, try typing "selectionMode" or "clearSelection" into Qt Assistant's index tab. You even knew the correct terms.
    J-P Nurmi

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

    jyoti (28th November 2006)

Similar Threads

  1. resizing a QTreeWidget
    By drhex in forum Qt Programming
    Replies: 6
    Last Post: 27th October 2006, 22:32
  2. Problem with QTreeWidget after subclassing
    By steve918 in forum Qt Programming
    Replies: 2
    Last Post: 28th July 2006, 18:51
  3. QTreeWidget problem!!
    By mcenatie in forum Qt Programming
    Replies: 2
    Last Post: 10th March 2006, 11:47
  4. few questions related to QTreeWidget
    By prakash in forum Qt Programming
    Replies: 9
    Last Post: 10th March 2006, 07:32
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.