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. [Qt Design Studio] Does QDS support graphical effect “ThresholdMask”?
Forum Updated to NodeBB v4.3 + New Features

[Qt Design Studio] Does QDS support graphical effect “ThresholdMask”?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 347 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.
  • G Offline
    G Offline
    gujinhe
    wrote on last edited by gujinhe
    #1

    hi,
    I'm a designer. I have read the document and found that there is a QML type "ThresholdMask" which interests me.
    (doc link:https://doc.qt.io/qt-5/qml-qtgraphicaleffects-thresholdmask.html)

    But when I try it in Qt Designer Studio, it doesn't work.

    version: QDS v1.2 community, Qt 5.12

    code bellow:

    import QtQuick 2.0
    import QtGraphicalEffects 1.0
    
    Item {
        id: root
    
        default property alias contentStack: stack.children
    
        implicitWidth: Math.max(32, stack.implicitWidth)
        implicitHeight: Math.max(32, stack.implicitHeight)
    
        Item {
            z: -1
            id: stack
            implicitWidth: blend.source.width + blend.source.x
            implicitHeight: blend.source.height + blend.source.y
    
            visible: false
        }
    
        ThresholdMask  {
            id: blend
            anchors.fill: parent
            source: root.background
            maskSource: root.foreground
    
        }
    
        property Item background
        property Item foreground
    
        property Item foo: Item {}
    
        Component.onCompleted: {
            root.background = stack.children[0]
            root.foreground = stack.children[1]
        }
    }
    
    

    QDS screenshot:
    13f811a7-b719-4067-bd1a-fd3d4a129dbc-image.png

    Is QDS supports this QML type?
    Thanks for your help.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      BrookCronin
      wrote on last edited by
      #2

      Yeah, it should work (as in it works for me). But i'm running the latest 1.4 release, perhaps try updating to that one?

      thresholdMask.png

      G 1 Reply Last reply
      0
      • B BrookCronin

        Yeah, it should work (as in it works for me). But i'm running the latest 1.4 release, perhaps try updating to that one?

        thresholdMask.png

        G Offline
        G Offline
        gujinhe
        wrote on last edited by
        #3

        @BrookCronin thank you, Bro! it worked! QDS v1.4 adds more effect.

        QDS v1.4
        1a57c63f-221a-4a13-a904-af1f3436b7db-image.png

        QDS v1.2
        204bc075-713d-4307-8b6c-1ef8386294c6-image.png

        1 Reply Last reply
        1

        • Login

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