[Qt-interest] Stylesheet widget reference
Ulf-Alexander v. Ceumern-Lindenstjerna
ceumern at vrmagic.com
Mon Sep 28 17:29:59 CEST 2009
Try:
QTableView::item { font-size: 12pt; }
Regards, Ulf
> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Thomi Richards
> Sent: Monday, September 28, 2009 5:23 PM
> To: qt-interest at trolltech.com
> Subject: [Qt-interest] Stylesheet widget reference
>
> Hi,
>
>
> I'm attempting to use Qt stylesheets to style a reasonably complex UI.
> So far things are going reasonably well, but I'm running into a
> difficulty:
>
> How can I work out what widget name I should be targeting for a
> particular part of a UI? For example, if I want to change the font
> size in the cells of a QTableView, do I write a style that targets
> QTableView? or perhaps QAbstractScrollArea? or perhaps
> QAbstractitemDelegate? As it turns out none of these seem to work - I
> assume this can be done, but it's a case of working out what the magic
> combination of widgets is to target the right part of the UI.
>
> The style sheet guide (http://doc.trolltech.com/4.5/stylesheet.html)
> helps somewhat, but seems to be missing a lot of information - the
> example for customising QTableView only mentions customising the cell
> background colour, and does not mention changing font colour, size,
> face, grid lines etc.
>
> Am i missing something here? Perhaps Using stylesheets is the wrong
> way to go? I certainly hope not, since the alternative (deriving from
> QStyle) seems much more complicated.
>
>
> Cheers,
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list