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. How do I realize mouse penetration of part of QuickWidget in QML?
Forum Updated to NodeBB v4.3 + New Features

How do I realize mouse penetration of part of QuickWidget in QML?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 2 Posters 589 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.
  • M Offline
    M Offline
    mirro
    wrote on last edited by mirro
    #1

    QuickWidget set Qt::WA_TransparentForMouseEvents Attribute. //realize mouse penetration in all areas.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      WA_TransparentForMouseEvents is for whole widget.

      If you added more details to your question, then maybe you could get a solution using
      MouseArea or similar.

      M 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        WA_TransparentForMouseEvents is for whole widget.

        If you added more details to your question, then maybe you could get a solution using
        MouseArea or similar.

        M Offline
        M Offline
        mirro
        wrote on last edited by
        #3

        @mrjj
        Hi~that's another question...

        How do I read the width property of BorderImage in QML using QuickWidget form C++?

        Rectangle {
            BorderImage {
                id:bI1
                x:150;
                source: "3.png";
                width: 200; height: 200;
                border.left: 35; border.top: 35;
                border.right: 35; border.bottom: 35;
            }
            BorderImage {
                id:bI2
                x:400;
                source: "3.png";
                width: 200; height: 200;
                border.left: 45; border.top: 45;
                border.right: 45; border.bottom: 45;
             }
         }
        
        mrjjM 1 Reply Last reply
        0
        • M mirro

          @mrjj
          Hi~that's another question...

          How do I read the width property of BorderImage in QML using QuickWidget form C++?

          Rectangle {
              BorderImage {
                  id:bI1
                  x:150;
                  source: "3.png";
                  width: 200; height: 200;
                  border.left: 35; border.top: 35;
                  border.right: 35; border.bottom: 35;
              }
              BorderImage {
                  id:bI2
                  x:400;
                  source: "3.png";
                  width: 200; height: 200;
                  border.left: 45; border.top: 45;
                  border.right: 45; border.bottom: 45;
               }
           }
          
          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @mirro
          Hi
          You can try to use
          "Accessing Loaded QML Objects by Object Name"
          https://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html

          M 1 Reply Last reply
          1
          • mrjjM mrjj

            @mirro
            Hi
            You can try to use
            "Accessing Loaded QML Objects by Object Name"
            https://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html

            M Offline
            M Offline
            mirro
            wrote on last edited by
            #5

            @mrjj thank you very much.

            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