[Qt-interest] Question regarding QTableView 4.5
Malyushytsky, Alex
alex at wai.com
Tue Jul 7 03:05:26 CEST 2009
According to my impression QStandardItemModel, as is, has nothing to do with data presentation.
So you can't use it to set text alignment.
QStandardItem does it with void QStandardItem::setTextAlignment ( Qt::Alignment alignment ).
You can get all QStandardItem pointers you need from QStandardItemModel.
Is this an answer you are looking for?
Regards,
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Patric
Sent: Saturday, July 04, 2009 8:08 AM
To: Diego Schulz; qtInterest
Subject: Re: [Qt-interest] Question regarding QTableView 4.5
Thank you, Diego. I was actually asking concrete about QStandardItemModel .
But I'll take a look at the learning video materials at that website.
Regards,
Patric
----- Original Message -----
From: "Diego Schulz" <dschulz at gmail.com>
To: "qtInterest" <qt-interest at trolltech.com>
Sent: Saturday, July 04, 2009 5:22 PM
Subject: Re: [Qt-interest] Question regarding QTableView 4.5
> 2009/7/4 Patric <userqt at gmail.com>:
>> Hello,
>> is there an easy way to set the text alignment for cells in QTableView,
>> using QStandardItemModel ?
>>
>> Thank you
>> Patric
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
> It depends on what you mean by "easy way" :)
> There's a great article about this in the documentation.
> http://doc.trolltech.com/4.5/model-view-creating-models.html
>
> I think you're interested in the concept of Roles.
>
> Also, there's an excellent webcast on Model/View framework at
> http://www.ics.com/learning/icsnetwork/
>
> IIRC, you will need to register (for free) at ICS website in order to
> be able to download.
>
> regards,
>
> diego
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
More information about the Qt-interest-old
mailing list