On Sun, 23 Oct 2011 12:01:02 -0500 Terry Brown <[email protected]> wrote:
> Also, perhaps a question for Ville, or google :-), does Qt have a > concept like CSS's classes? That would make styling simpler. http://doc.qt.nokia.com/latest/stylesheet-syntax.html#selector-types Suggests no, not really. You can select elements based on Qt class inheritance, but you can't tag an element with a set of classes as you can in CSS. Ah, but you can do it, something like: QLineEdit *nameEdit = new QLineEdit(this); nameEdit->setProperty("style_class", "required_field small_widget"); then *[style_class~='small_widget'] { font-size: 80%; } I'm thinking it would be useful to move to as close to completely stylesheet based styling as possible for Leo, although I'm not sure how that integrates with the syntax colorizer - are the blocks of uniformly styled text in Leo body windows potential targets for Qt styles? Also, it seems you can only have one stylesheet at a given level in the widget hierarchy, so your stuck putzing around merging and separating stylesheets at the textual level, but we can probably wrap that up in some utility functions. Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
