Please nominate your Qt Champions for 2021!

How to use CSS with Qt Designer?

  • Hi folks,

    I'm a new user of QT Designer, having just installed it yesterday. I've got some previous experience of GUI design from Visual Basic from years ago so I'm trying to rejog my memory.
    I came across a CSS style template for available for use that I'd like to incorporate to animate my PushButtons, however, when I paste the CSS code into my StyleSheet, all it does it causes a slight colour change when I hover over my PushButtons.

    The template should create a rainbow colour effect on the border of the button on hovering, so it's obviously not doing the correct thing.

    Is there any pointers as to how to properly incorporate CSS into StyleSheet? Is it as straightforward as copying and pasting?

    Thanks in advance, any help would be appreciated!

    I've attached a link to the animations I'm trying to use here:

  • Moderators

    Qt does not use CSS. The "StyleSheet" property expects QSS code

Log in to reply