Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. BorderImages and transparency in images
Forum Updated to NodeBB v4.3 + New Features

BorderImages and transparency in images

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 3 Posters 4.5k Views 1 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.
  • S Offline
    S Offline
    scarleton
    wrote on last edited by
    #1

    Here is the button:

    !http://www.miltonstreet.com/qt/ButtonBorder.png(The button)!

    The application background is dark, when it is used in a ButtonImage, the corners are always white, not transparent. Is there something wrong with the PNG format or is it a code thing?

    @ BorderImage {
    id: buttonImage
    source: "images/ButtonBorder.sci"
    width: container.width; height: container.height
    }@

    ButtonBorder.sci

    @border.left: 4
    border.top: 4
    border.bottom: 4
    border.right: 4
    source: ButtonBorder.png
    @

    1 Reply Last reply
    0
    • T Offline
      T Offline
      thahir1986
      wrote on last edited by
      #2

      just add

      color: "transparent"

      in ButtonBorder.sci

      yet not start ;)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mbrasser
        wrote on last edited by
        #3

        Hi,

        You shouldn't need to do anything special, it should "just work" (testing with a black background on OS X, the above image in a BorderImage worked fine for me -- no white corners). What platform and graphics system (raster, opengl, etc) are you using?

        Regards,
        Michael

        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