[Qt-interest] C++ or QML

Andre Somers andre at familiesomers.nl
Mon Jun 28 21:20:01 CEST 2010


Op 27-6-2010 18:50, Thiago Macieira schreef:
>
>> For Example:
>> - Styling border and transparency of QTableView.
>> - Elide mode in styled QHeaderView.
>> - Styling of QHeaderView.
>>      
> Forget styling and use QML.
>
> Qt classic widgets were made to have native look and feel. They were not made
> to be tweakable -- that is the opposite of native look and feel. That's why
> the use of stylesheets causes such a slowdown.
>
> If you want to change the look, you should use styles, not stylesheets, or
> paint the widget yourself.
>
> But, anyway, precise "how I want it to look" is exactly what Qt Quick is
> about.
>    
Seriously? Are you suggesting that because one feature was appearantly 
never properly implemented, we now switch to using a complete new API 
that is still in it's infancy? And if problems show with that API, will 
we be referred to use the then API-du-jour instead? What's more, for 
styling a QTableView, Quick does not seem to provide the answer, as the 
build in lists and models only support one-dimensional lists. I guess 
that has to do with prime target of Quick (handheld UI's?) that make 
other structures than lists a bit difficult to handle, but that does 
mean, that for the desktop, it won't do.

I think that it is reasonable that if a technology like using style 
sheets on widgets is introduced in the main API, it will be mature 
enough to actually use, will be supported and optimized, and we can 
count on that being the case for the forseeable future. Your comment 
above is not very reassuring in that respect.

Making a QTableView look the way you want is too difficult as it is. 
Stylesheets are a way out, though still very much incomplete IMNSHO. At 
least they allow styling things like the selected and current items in 
terms of colours, but manipulating the text alignment on a per-column 
basis for instance is really missing.

André





More information about the Qt-interest-old mailing list