跳到內容
  • 版面
  • 最新
  • 標籤
  • 熱門
  • 使用者
  • 群組
  • 搜尋
  • Get Qt Extensions
  • Unsolved
Collapse
品牌標誌
  1. 首頁
  2. Qt Development
  3. QML and Qt Quick
  4. Transparent window
Forum Updated to NodeBB v4.3 + New Features

Transparent window

已排程 已置頂 已鎖定 已移動 QML and Qt Quick
24 貼文 2 Posters 7.2k 瀏覽 1 Watching
  • 從舊到新
  • 從新到舊
  • 最多點贊
回覆
  • 在新貼文中回覆
登入後回覆
此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
  • Z 離線
    Z 離線
    Zubalama
    寫於 最後由 編輯
    #8

    am sorry but could you write me a code once more? with that last suggestion?

    1 條回覆 最後回覆
    0
    • p3c0P 離線
      p3c0P 離線
      p3c0
      Moderators
      寫於 最後由 編輯
      #9

      Are you using QtCreator to execute that file ?

      157

      1 條回覆 最後回覆
      0
      • Z 離線
        Z 離線
        Zubalama
        寫於 最後由 編輯
        #10

        yes I'm using QtCreator

        1 條回覆 最後回覆
        0
        • p3c0P 離線
          p3c0P 離線
          p3c0
          Moderators
          寫於 最後由 編輯
          #11

          Then Keeping your current project selected, go to
          QtCreator > Projects (On Left side pane) > Build & Run > Run > Run > Arguments

          and add "--transparent" as argument there for qmlscene.

          Note: There are two hypens for transparent, it appears to be combined after posting.

          157

          1 條回覆 最後回覆
          0
          • Z 離線
            Z 離線
            Zubalama
            寫於 最後由 編輯
            #12

            What should I write in executable?

            1 條回覆 最後回覆
            0
            • p3c0P 離線
              p3c0P 離線
              p3c0
              Moderators
              寫於 最後由 編輯
              #13

              Which "executable" ?

              157

              1 條回覆 最後回覆
              0
              • p3c0P 離線
                p3c0P 離線
                p3c0
                Moderators
                寫於 最後由 編輯
                #14

                Here's a screenshot:

                !http://i.imgur.com/PiTcIPc.jpg(Image)!

                Check the highlighted part.

                157

                1 條回覆 最後回覆
                0
                • Z 離線
                  Z 離線
                  Zubalama
                  寫於 最後由 編輯
                  #15

                  https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpa1/v/t35.0-12/10947716_1556252631297585_1470867109_o.jpg?oh=05324a7b6cbff1fd5d4bf8d380ab3c10&oe=54C4A0F3&gda=1422186850_fc60db39f143bc07c6d644ac553a6e00 you mean this projects right? then build & run > run>run

                  1 條回覆 最後回覆
                  0
                  • p3c0P 離線
                    p3c0P 離線
                    p3c0
                    Moderators
                    寫於 最後由 編輯
                    #16

                    Yes exactly. Just remove the double quotes.

                    157

                    1 條回覆 最後回覆
                    0
                    • Z 離線
                      Z 離線
                      Zubalama
                      寫於 最後由 編輯
                      #17

                      oh no I meant to say that I want to see through it but like see that too for example I want to see that desktop but also I want to see whatever is written in this window

                      1 條回覆 最後回覆
                      0
                      • p3c0P 離線
                        p3c0P 離線
                        p3c0
                        Moderators
                        寫於 最後由 編輯
                        #18

                        So what doesn't work for you ? If you have a Text element in this QML it will displayed as it is. It wont be affected by transparency.

                        157

                        1 條回覆 最後回覆
                        0
                        • Z 離線
                          Z 離線
                          Zubalama
                          寫於 最後由 編輯
                          #19

                          https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpa1/v/t35.0-12/10939223_1556263367963178_1544022371_o.jpg?oh=16c8895a103701afce881a59cb81adbd&oe=54C47132&gda=1422166051_83ea345a38440bae9096d65ba7cb4658 this is what I see :S

                          1 條回覆 最後回覆
                          0
                          • p3c0P 離線
                            p3c0P 離線
                            p3c0
                            Moderators
                            寫於 最後由 編輯
                            #20

                            It seems the Window itself has completely disappeared. Since I can't see it running in the task bar.

                            Here is what it looks like on my machine:
                            !http://i.imgur.com/8gLea96.jpg(Image3)!

                            Kept the default Project template like yours and just added color and opacity for rectangle. In my case it is seen running in taskbar.

                            157

                            1 條回覆 最後回覆
                            0
                            • Z 離線
                              Z 離線
                              Zubalama
                              寫於 最後由 編輯
                              #21

                              https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpa1/v/t35.0-12/10939702_1556293987960116_1857895721_o.jpg?oh=e93e41326dae7fe78469f86c82422521&oe=54C446AE&gda=1422175359_dedd565ef5e2187a514864fbd530d364 I am more confused then everything else on this planet, and even more embaressed

                              1 條回覆 最後回覆
                              0
                              • p3c0P 離線
                                p3c0P 離線
                                p3c0
                                Moderators
                                寫於 最後由 編輯
                                #22

                                Quite strange. It is running but it is not shown in the taskbar. And if you remove the "--transparent" argument it shows as expected ?
                                It could be bug. It seems you are running it on Windows XP. It tried it on Linux, Ubuntu flavor.
                                Try creating it the other way.
                                Create a new project as,
                                File > New File Or Project > Application > Qt Quick Application
                                and then in main.qml, you will find Window as root element. Try setting opacity to it.
                                @
                                import QtQuick 2.4
                                import QtQuick.Window 2.2

                                Window {
                                visible: true
                                opacity: 0.4
                                MainForm {
                                anchors.fill: parent
                                mouseArea.onClicked: {
                                Qt.quit();
                                }
                                }
                                }
                                @

                                157

                                1 條回覆 最後回覆
                                0
                                • Z 離線
                                  Z 離線
                                  Zubalama
                                  寫於 最後由 編輯
                                  #23

                                  strange but same stuff :S

                                  1 條回覆 最後回覆
                                  0
                                  • p3c0P 離線
                                    p3c0P 離線
                                    p3c0
                                    Moderators
                                    寫於 最後由 編輯
                                    #24

                                    It seems to b a bug then since it works on Linux. You can report it on "Qt bugs tracker":https://bugreports.qt.io. Mention the scenario, OS, Qt Version and possibly a small reproducible example.

                                    157

                                    1 條回覆 最後回覆
                                    0

                                    • 登入

                                    • Login or register to search.
                                    • 第一個貼文
                                      最後的貼文
                                    0
                                    • 版面
                                    • 最新
                                    • 標籤
                                    • 熱門
                                    • 使用者
                                    • 群組
                                    • 搜尋
                                    • Get Qt Extensions
                                    • Unsolved