[Qt-interest] How can I select a specific cell from QTableView ?

Mhayk Whandson eu at mhayk.com.br
Sun Aug 2 23:14:21 CEST 2009


This didn't work. Are you know if is possible emit anyone signal which
click a one especific cell from QTableView ?

best regards,

On Sun, Aug 2, 2009 at 5:04 PM, David Boosalis<david.boosalis at gmail.com> wrote:
> Not really sure, maybe you need to have something as simple as
> multiple selection mode turned on,
>
> myView->setSelectionMode(QAbstractItemView::MultiSelection);
>
> Just a guess though.
>
> On Sun, Aug 2, 2009 at 9:16 AM, Mhayk Whandson<eu at mhayk.com.br> wrote:
>> Hi David,
>>
>> I tried your tip and the specific cell from column just stay
>> highlight, I think that function "select()" should select the cell too
>> but It just select highlight. Are you have other idea ?
>>
>> On Sun, Aug 2, 2009 at 5:26 AM, David Boosalis<david.boosalis at gmail.com> wrote:
>>> This might help you, haven't tired it though
>>>
>>> QAbstractItemModel  *model  =myTableView->model();
>>> if (model->hasIndex(row,column) {
>>>  QModelIndex index = model->index(row,column);
>>>  QItemSelectionModel *selectModel =  myTableView->selectionModel();
>>>  selectModel->select(index,QItemSelectionModel::SelectCurrent);
>>> }
>>>
>>>
>>>
>>>
>>> On Sun, Aug 2, 2009 at 12:52 AM, Mhayk Whandson <eu at mhayk.com.br> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I would like to select a specific cell from QTableView to use the
>>>> function keyboardSearch(). Can you help me ?
>>>>
>>>> best regards,
>>>>
>>>> []'s
>>>>
>>>> --
>>>> Mhayk Whandson
>>>> Linux User #413723
>>>> E-mail: eu at mhayk.com.br
>>>> _______________________________________________
>>>> Qt-interest mailing list
>>>> Qt-interest at trolltech.com
>>>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>
>>
>>
>>
>> --
>> Mhayk Whandson
>> Linux User #413723
>> E-mail: eu at mhayk.com.br
>>
>



-- 
Mhayk Whandson
Linux User #413723
E-mail: eu at mhayk.com.br




More information about the Qt-interest-old mailing list