Skip to content
  • 0 Votes
    3 Posts
    3k Views
    C

    @Jacob.zhang That works, so visiblity do the trick. Thanks.

  • 0 Votes
    3 Posts
    3k Views
    M

    Hi @Lisbetti,

    Your question reminds me of a real-time "zoom" feature that clones part of a component that I've just developed using ShaderEffectSource.

    ShaderEffectSource allows to select, in real time and with high performance, a part of a component and display it in another larger rectangle for zooming in.

    // To add to your "source" component. MouseArea { id: iMouseArea anchors.fill: parent hoverEnabled: true propagateComposedEvents: true onPositionChanged:(mouse) => { // Allow events to be transmitted to components below. mouse.accepted = false iShaderEffectSource.sourceRect = Qt.rect(mouse.x-75, mouse.y-50, 150, 100) } } ... Rectangle { id: iRectDest width: 300 height: 200 anchors.right: parent.right ShaderEffectSource { id: iShaderEffectSource anchors.fill: parent sourceItem: iRectSrc /* Preserve visual quality. */ textureSize: Qt.size(iRectDest.width, iRectDest.height) }