×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    2

    QTreeView Selected Row?

    Hi, im just wanderin if theres some way that i can check wich row the user has selected to use the info of the selected row and copy that into a QTextEdit.

    Basic Idea:

    > User looks at the list.
    > User selects the row that him is intrested on.
    > User clicks QPushButton to add the info to the QTextEdit, or just double clicks in the row.

    Thanks, im kinda lowbie overhere, so be gentle.

    PD.Sorry about my english.

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QTreeView Selected Row?

    Use QTreeView::selectedIndexes() to get indices of selected items
    http://doc.qt.nokia.com/4.6/qtreevie...electedIndexes

  3. #3
    Registered User
    Join Date
    Jun 2010
    Posts
    2

    Re: QTreeView Selected Row?

    I dont get the use of that, i dont know whats the value that it can return. I mean the type of it.

    Also it says that its protected when i try to test it and theres no much documentation about it.

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QTreeView Selected Row?

    Quote Originally Posted by g33kz0rd View Post
    I dont get the use of that, i dont know whats the value that it can return. I mean the type of it.
    It's list of QModelIndex http://doc.qt.nokia.com/4.6/qmodelindex.html

Similar Threads

  1. editing a particular row
    By devalin85 in forum Mobile Java General
    Replies: 1
    Last Post: 2010-03-12, 07:46
  2. Replies: 1
    Last Post: 2009-07-04, 14:22
  3. Replies: 5
    Last Post: 2005-10-18, 06:23
  4. 3 fields in 1 row
    By youngboyguy in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2004-08-12, 10:15
  5. 3 fields in 1 row
    By youngboyguy in forum Mobile Java General
    Replies: 0
    Last Post: 2004-07-07, 07:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •