[Qt-interest] Style sheet mistakes

william.crocker at analog.com william.crocker at analog.com
Sun Sep 27 18:50:17 CEST 2009


> For example, the mistake in the following
> spec causes it to fail silently.
> Qt does not catch my mistake so I assume that
> my understanding of the system is incorrect
> and move on to try something else.
> 
>    padding-left: 0px; padding-right: 10px  padding-top: 5px;
>         Missing semi-colon after 10px ---^
> 
>    I set the style with: QWidget::setStyleSheet() 


> 
> I believe the checking is a basic syntax check and nothing else.  It doesn't 
> tell you if you specify properties that don't exist on the widget, for 
> example.  So this offers very limited help to me, although some is better 
> than none.
>

I have never seen any evidence of checking during
the style sheet parsing process.

Hey Trolltech, You need to perform syntactic and semantic
checking during the processing of style sheets.

My C++ compiler complains when I leave out a semi-colon
and so should you.

My C++ compiler complains when I misspell a keyword
and so should you.

This is basic stuff and you should be ashamed of yourself.
Missing an opportunity to point out an obvious
user error is a software engineering crime.

Bill




More information about the Qt-interest-old mailing list