Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Hardness of brush
Qt 6.11 is out! See what's new in the release blog

Hardness of brush

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 809 Views 2 Watching
  • 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.
  • G Offline
    G Offline
    Guan
    wrote on last edited by
    #1

    We used qbrush and qpen to draw round dots of different sizes in a qpainter application. The dots of large size look at disks. What I really want is drawing dots with radial gradient of opacity --- similar to the paintbrush selection in Gimp or Photoshop, so that later drawn dots will alpha-blending with those previously drawn or background.

    Can someone suggest how to achieve this? Thanks.

    Guan

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      Hi Guab,

      Have a try with

      Qt::RadialGradientPattern

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Guan
        wrote on last edited by
        #3

        @Eddy said:

        Qt::RadialGradientPattern

        Hi Eddy,

        Thank you very much for the quick response. I tried but didn't have luck. Perhaps, I used it in a wrong way. It seems to me that it only works if you use drawEllipse not drawPoint.

        If you have a sample code to show how it works, I would appreciate it very much.

        Best,
        Guan

        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