[Qt-interest] How Can I align to right a specific column from QTableView ?

Mhayk Whandson eu at mhayk.com.br
Thu Oct 22 17:08:10 CEST 2009


Hi Stefano,

Is this fuction ?

QVariant QSqlQueryModel::data ( const QModelIndex & item, int role =
Qt::DisplayRole )

I would like that all items from a specific columns align to center.
Could you show me an example ?

best regards,

On Thu, Oct 22, 2009 at 10:48 AM, Stefano Rosellini
<s.rosellini at iv-srl.it> wrote:
> In "data" method of your model you must reply to Qt::TextAlignment
> request of that column with the correct alignment. The other option is
> to use a delegate for that view.
>
> Mhayk Whandson ha scritto:
>> hi all,
>>
>> I would like to align a specific column from QTableView, could you help me ?
>>
>>
>> best regards,
>>
>>
>
>
> --
> Stefano Rosellini
> Informatica Valdinievole
>
> _______________________________________________
> 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



More information about the Qt-interest-old mailing list