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. Win XP Transparency
Forum Updated to NodeBB v4.3 + New Features

Win XP Transparency

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 1.2k Views 2 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.
  • A Offline
    A Offline
    alecs26
    wrote on last edited by
    #1

    Hello,

    I am developing a software with Qt5 on Windows (MinGw 5.7). I want my program to be compatible with WinXP.
    The only problem is transparency...Every application window I create that is transparent will not show in XP.
    What can I do (I need transparent windows).

    Thank you very much,

    Alex

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by A Former User
      #2

      Hi! I'll ask this (stupid?) question before someone else feels invited: Doesn't "transparent" mean "doesn't show up"?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alecs26
        wrote on last edited by
        #3

        hahaha ok well I underderstand how it may sound, I guess I must clarify some things !

        I have an application window. I need a part of this application window to be transparent.
        However, if any part of the application window is transparent, the application window does not show.
        It's like if the application window totally crashes because it doesn't know what Transparent is...

        Thanks !

        Alex

        mrjjM 1 Reply Last reply
        0
        • A alecs26

          hahaha ok well I underderstand how it may sound, I guess I must clarify some things !

          I have an application window. I need a part of this application window to be transparent.
          However, if any part of the application window is transparent, the application window does not show.
          It's like if the application window totally crashes because it doesn't know what Transparent is...

          Thanks !

          Alex

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @alecs26
          Hi
          I think we need to see the code you try to use for transparent window
          in xp.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alecs26
            wrote on last edited by alecs26
            #5

            @mrjj Good idea. I ran more tests with a very simple interface to find the problem. It's a green application window containing a red square. I compile the program on Windows 8 and it works on Win XP also.

            First, with the following code, instead of a green application window, I set it as transparent. However, the application window becomes black. instead of transparent. What I should see is a red square on a transparent larger window but what I see is a red square on a black larger window.

            ApplicationWindow {
                visible: true
                width: 640
                height: 480
                title: qsTr("Hello World")
            
                color:"green"
            
                Rectangle
                {
                    width: 150
                    height: 150
                    color:"red"
                }
            
            }
            

            I also need to enable some flags (Qt.FramelessWindowHint and Qt.WindowStaysOnTopHint). However, when I do this with a transparent application window, nothing appears at all. What I should see is a red square on a transparent larger window but what I see is nothing at all.

            ApplicationWindow {
                visible: true
                width: 640
                height: 480
                title: qsTr("Hello World")
            
                flags: Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint
            
                color:"green"
            
                Rectangle
                {
                    width: 150
                    height: 150
                    color:"red"
                }
            
            }
            

            I also ran the same code on a Windows 7 64 bit PC.
            Instead of not showing at all, the transparent portion was black.
            Everything works well on my PC on Windows 8 and 10.

            Thank you very much !

            Alex

            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