Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Showcase
  4. Struggling with qlineargradient to style your app? No more! (userscript for the "Ultimate CSS Gradient Generator")
Forum Update on Monday, May 27th 2025

Struggling with qlineargradient to style your app? No more! (userscript for the "Ultimate CSS Gradient Generator")

Scheduled Pinned Locked Moved Showcase
2 Posts 2 Posters 5.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AniLeech
    wrote on last edited by
    #1

    Hello,

    Perhaps an odd one to post in the "Showcase" forum, but I wrote a userscript (javascript that you 'install' locally) for Firefox(+Greasemonkey)/Chrome/Opera and hopefully even Safari*. The script adds limited support for qlineargradients to the "[url=http://www.colorzilla.com/gradient-editor/]Ultimate CSS Gradient Editor[/url]".
    Very useful if you want to create a linear gradient in a WYSIWYG fashion or just want to convert an image to a gradient (the site let's you upload an image to be converted to a gradient). It does come with some limitations, -it only supports hex-based colors, as that's what I needed myself and I read something about Qt not supporting rgba so I figured that would be an useless option.-
    v1.1 is now out and handles RGB/RGBA as well.
    v1.2 is now out, small bugfix so rgba values that have no comma don't cause issues (e.g. rgba(32,32,32,1).

    If anyone wants support for the other color options (or other features) feel free to ask and I'll see what I can do.

    *Cannot test Safari support, don't have a Mac and the Windows version of Safari doesn't support userscripts

    [edit]
    I noticed I forgot something rather essential.. a link to the script itself, so here :)
    http://userscripts.org/scripts/show/107090

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      That's very cool! Nice work!

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved