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. make a transparent Rectangle

make a transparent Rectangle

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
12 Posts 4 Posters 2.2k 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.
  • dheerendraD Offline
    dheerendraD Offline
    dheerendra
    Qt Champions 2022
    wrote on last edited by
    #3

    Can you help with more details on your requirement ? Your question and description confused me. If possible give us your complete qml and tell us what you would like to achieve.

    Dheerendra
    @Community Service
    Certified Qt Specialist
    http://www.pthinks.com

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cosmoff
      wrote on last edited by
      #4

      thanks for your answer, unfortunately it does not work.

      Rectangle{
      width: 500
      height: 250
      color: "transparent"
      visible: false
      }

      App{
      width: 500
      height: 250

      }

      the first Rectangle does not exist anymore in my display and the second rectangle which is the App take all the place of my window

      M 1 Reply Last reply
      0
      • C Offline
        C Offline
        cosmoff
        wrote on last edited by cosmoff
        #5

        Ok, I use a first program in qml which call another program (with the 2 rectangles). The problem is that to shutdown the second program I have to click just on a button which is in the first program. So in the second application I have to make a kind of hole to acces at the firt program. The hole is the first Rectangle.

        I hope it is more clear

        CKurduC 1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #6

          When you say first program & second program, Are you running two different applications as two different processes ? Is this the case ?

          OR

          You have two qml files. First.qml & Second.qml. When you click on the first.qml object you are launching the Second.qml object.

          Which is your scenario ?

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          0
          • C cosmoff

            thanks for your answer, unfortunately it does not work.

            Rectangle{
            width: 500
            height: 250
            color: "transparent"
            visible: false
            }

            App{
            width: 500
            height: 250

            }

            the first Rectangle does not exist anymore in my display and the second rectangle which is the App take all the place of my window

            M Offline
            M Offline
            MAthias_Va
            wrote on last edited by
            #7

            @cosmoff the idea is to make it visible or not according to your need (onClicked: rectangleID.visible=true)

            1 Reply Last reply
            0
            • C Offline
              C Offline
              cosmoff
              wrote on last edited by
              #8

              @dheerendra said in make a transparent Rectangle:

              running two different applications as two different processes

              yes I am running two different applications as two different processes

              1 Reply Last reply
              0
              • dheerendraD Offline
                dheerendraD Offline
                dheerendra
                Qt Champions 2022
                wrote on last edited by
                #9

                How are you launching the second program first program ? Are you using QProcess to launch the second program ?

                Dheerendra
                @Community Service
                Certified Qt Specialist
                http://www.pthinks.com

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  cosmoff
                  wrote on last edited by
                  #10

                  Yes I use a QProcess

                  1 Reply Last reply
                  0
                  • C cosmoff

                    Ok, I use a first program in qml which call another program (with the 2 rectangles). The problem is that to shutdown the second program I have to click just on a button which is in the first program. So in the second application I have to make a kind of hole to acces at the firt program. The hole is the first Rectangle.

                    I hope it is more clear

                    CKurduC Offline
                    CKurduC Offline
                    CKurdu
                    wrote on last edited by CKurdu
                    #11

                    @cosmoff said in make a transparent Rectangle:

                    I have to make a kind of hole to acces at the firt program. The hole is the first Rectangle.

                    I think you can't create a hole for two separate GUI applications. Also, you can't create a hole making a rectangle transparent.
                    You can use QProcess to close the second application.
                    Are you programming also the first program?
                    If you are programming the second program, Why do you need the first program to close the second program?

                    Really complicated.

                    You reap what you sow it

                    1 Reply Last reply
                    0
                    • dheerendraD Offline
                      dheerendraD Offline
                      dheerendra
                      Qt Champions 2022
                      wrote on last edited by
                      #12

                      In addition to what @CKurdu said, you can't do much from one process to another process. At the most you can monitor the second program from first program using the QProcess finished() signal and do something in the first program. Not very clear about your objective as well.

                      Dheerendra
                      @Community Service
                      Certified Qt Specialist
                      http://www.pthinks.com

                      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