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 to make qml window embedded in desktop?

How to make qml window embedded in desktop?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 2 Posters 650 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.
  • S Offline
    S Offline
    senmx
    wrote on last edited by senmx
    #1

    The effect I need is: Even showing or hiding (Win+D) the desktop does not affect it.

    import QtQuick 2.12
    import QtQuick.Window 2.12
    
    Window {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
        color: "transparent"
        flags: Qt.FramelessWindowHint
    
        Rectangle {
            anchors.fill: parent
            color:"transparent"
            Column {
                Text {
                    text:"hello world"
                    color: "white"
                    font.pointSize: 60
                }
            }
        }
    }
    
    1 Reply Last reply
    0
    • MarkkyboyM Offline
      MarkkyboyM Offline
      Markkyboy
      wrote on last edited by
      #2

      I have 2 desktop apps created with QML, both of them hide when doing 'Win+D'. Both apps are using only 'Qt.FramelessWindowHint'. In fact, they hide from desktop whether run from SDK or desktop.

      Perhaps there is a .dll missing from your apps deployment folder?

      Don't just sit there standing around, pick up a shovel and sweep up!

      I live by the sea, not in it.

      S 1 Reply Last reply
      0
      • MarkkyboyM Markkyboy

        I have 2 desktop apps created with QML, both of them hide when doing 'Win+D'. Both apps are using only 'Qt.FramelessWindowHint'. In fact, they hide from desktop whether run from SDK or desktop.

        Perhaps there is a .dll missing from your apps deployment folder?

        S Offline
        S Offline
        senmx
        wrote on last edited by
        #3

        @Markkyboy Thanks. It seems that I did not express the problem clearly, and revised the problem again. I need to embed the window in the desktop.

        MarkkyboyM 1 Reply Last reply
        0
        • S senmx

          @Markkyboy Thanks. It seems that I did not express the problem clearly, and revised the problem again. I need to embed the window in the desktop.

          MarkkyboyM Offline
          MarkkyboyM Offline
          Markkyboy
          wrote on last edited by
          #4

          So,........you want to embed a Window (made with QML) in to your Windows desktop?, if so, you are then saying that you don't want your embedded window to be affected (remain showing) when Win+D is used?

          Don't just sit there standing around, pick up a shovel and sweep up!

          I live by the sea, not in it.

          S 1 Reply Last reply
          0
          • MarkkyboyM Markkyboy

            So,........you want to embed a Window (made with QML) in to your Windows desktop?, if so, you are then saying that you don't want your embedded window to be affected (remain showing) when Win+D is used?

            S Offline
            S Offline
            senmx
            wrote on last edited by senmx
            #5

            @Markkyboy bingo, I found the following solution:

            BOOL Widget::enumUserWindowsCB(HWND hwnd,LPARAM lParam)
            {
                long wflags = GetWindowLong(hwnd, GWL_STYLE);
                if(!(wflags & WS_VISIBLE)) return TRUE;
            
                HWND sndWnd;
                if( !(sndWnd=FindWindowEx(hwnd, NULL, L"SHELLDLL_DefView", NULL)) ) return TRUE;
                HWND targetWnd;
                if( !(targetWnd=FindWindowEx(sndWnd, NULL, L"SysListView32", L"FolderView")) ) return TRUE;
            
                HWND* resultHwnd = (HWND*)lParam;
                *resultHwnd = targetWnd;
                return FALSE;
            }
            
            
            HWND Widget::findDesktopIconWnd()
            {
                HWND resultHwnd = NULL;
                EnumWindows((WNDENUMPROC)enumUserWindowsCB, (LPARAM)&resultHwnd);
                return resultHwnd;
            }
            

            but the compiler not found BOOL, LPARAM

            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