[Interest] Trouble setting stylesheet for widget
Shinnok
admin at shinnok.com
Wed Sep 9 21:22:43 CEST 2015
Mike,
Although not specifically named in the documentation, my approach has worked for years and is used by many projects.
However, using that method doesn't yield results either...
Worth mentioning is that the same stylesheet you see in my link has been like that since the start of the project and only since upgrading my Qt toolchain and Creator the problem has risen and with a delayed effect, after I changed something..
Shinnok
> On Sep 9, 2015, at 7:29 PM, Mike Chinander <chinander at gmail.com> wrote:
>
> For styling named widgets, I thought you needed to use QWidgetType#Objectname::element { }
>
> In your case:
> QTabWidget#mainTabWidget::tab {
>
> }
>
> On Wed, Sep 9, 2015 at 11:14 AM, Shinnok <admin at shinnok.com <mailto:admin at shinnok.com>> wrote:
> Hi list,
>
> I'm currently having a lot of trouble setting object specific stylesheet. I'm on Qt 5.4.2/OSX 10.10/Creator 3.5.0. The stylesheet is set from Creator -> Designer on the object property:
>
> #mainTabWidget::tab {
> ...
> }
>
> #mainTabWidget::tab:selected
> {
> }
>
> However this:
> #mainTabWidget<whitespace here>::tab {
>
> Seems to apply. I don't remember this being the case with stylesheets syntax for selectors nor the documentation yields that. This is also not the first time I'm touching QSS. Full stylesheet in question https://github.com/Tarsnap/tarsnap-gui/blob/master/forms/mainwindow.ui#L76 <https://github.com/Tarsnap/tarsnap-gui/blob/master/forms/mainwindow.ui#L76> . None of those rules get applied for some reason.
>
> Maybe it's my setup or a Qt toolchain bug. Any idea as to what's going on here?
>
>
> Regards,
> Shinnok
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org <mailto:Interest at qt-project.org>
> http://lists.qt-project.org/mailman/listinfo/interest <http://lists.qt-project.org/mailman/listinfo/interest>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150909/a9e42b0a/attachment.html>
More information about the Interest
mailing list