Results 1 to 4 of 4

Thread: QtableWidget

  1. #1
    Join Date
    Mar 2010
    Location
    Brasília, Brasil
    Posts
    15
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Post QtableWidget

    I wonder, as I select multiple cells in QTableWidget object across the line of code?

    I know: setCurrentCell ();//but this function selects only a single cell, and I would like to select several cells.


    Thank you very much !

  2. #2
    Join Date
    Feb 2010
    Posts
    53
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QtableWidget

    void QTableWidgetItem::setSelected ( bool select ) ?

    Sets the selected state of the item to select.

    This function was introduced in Qt 4.2.

    At a guess or

    void QTableWidget::setCurrentItem ( QTableWidgetItem * item )

    Sets the current item to item.

    Depending on the current selection mode, the item may also be selected.

    See also currentItem() and setCurrentCell().

    I'm a beginner too and don't think the documentation is very clear. Hope this helps.

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QtableWidget

    See the second parameter or setCurrentItem(): QItemSelectionModel::SelectionFlags. There you could influence the behavior of the selection.

  4. #4
    Join Date
    Mar 2010
    Location
    Brasília, Brasil
    Posts
    15
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Thumbs up Re: QtableWidget

    Thanks for help

Similar Threads

  1. QTableWidget
    By pippo42 in forum Qt Programming
    Replies: 1
    Last Post: 12th November 2009, 13:42
  2. Help with QTableWidget
    By aarelovich in forum Qt Programming
    Replies: 4
    Last Post: 20th July 2009, 12:22
  3. QTableWidget
    By rick_st3 in forum Newbie
    Replies: 1
    Last Post: 20th June 2008, 10:05
  4. QTableWidget
    By therealjag in forum Newbie
    Replies: 22
    Last Post: 28th February 2006, 16:28
  5. QTableWidget
    By campana in forum Qt Programming
    Replies: 7
    Last Post: 24th February 2006, 08:45

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.