[PyQt] Widget CSS hints

Aron Bierbaum aronbierbaum at gmail.com
Wed Oct 10 13:17:03 BST 2007


On 10/10/07, Richard Smith <richard at omniaccess.com> wrote:
> Hi guys,
>
> I'm not sure if this is the right place to ask, so if you could point me in
> the direction of where to ask if this isn't the right place, I'd appreciate
> the hint.
>
> Essentially, I'm building an application that's going to be deployed
> primarily on an embedded system with a touch screen. Unfortunately that the
> primary audience for this system don't have petit fingers and so I'm having
> to apply CSS all over the place in order to make widgets more finger
> friendly.
>
> I've got 2 problems at the moment:
>
> Toolbox tabs don't appear to be able to re-size, despite the documentation
> stating that they support the box model.
>
> Dropdown lists. How do I restyle the elements in the QAbstractItemView
> widget? I've got a combo box and would like to add some padding to the
> elements of the drop down list. The combo box itself has styled perfectly,
> however the QAbstractItemView widget seems a little elusive.

For a combobox you can just change the font using:

QComboBox {
   font: 20px;
}

This should allow your users more space to make their selection.

-Aron

> Does anyone have any suggestions as to:
>
> a) How I can style these widgets?
> b) If there are any pre-defined "touch-screen" styles that can be used.
>
> Kind regards
>
> --
> Richard Smith                 | OmniAccess S.L.
> Phone: +34 971 221 979        | Plaza Mediterranea 4, Apt 1-12
> Fax:   +34 971 221 978        | 07015 Palma de Mallorca
> Email: richard at omniaccess.com | Baleares, SPAIN
>
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>


More information about the PyQt mailing list