View Full Version : QtableWidget
lucasbemo
16th March 2010, 19:14
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 !
:cool:
hollowhead
16th March 2010, 22:14
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.
Lykurg
16th March 2010, 22:36
See the second parameter or setCurrentItem(): QItemSelectionModel::SelectionFlags. There you could influence the behavior of the selection.
lucasbemo
17th March 2010, 14:25
Thanks for help
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.