[GH-ISSUE #174] Image element cannot display web image #111

Closed
opened 2026-05-05 11:05:21 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @MingHuiLiu on GitHub (Nov 23, 2019).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/174

Image element cannot display web image.
This bug can now be resolved by converting to a local image, but I want to use webview and find that it is not currently supported. I just want to play the video (playing a web video requires a custom cookie header), I don't know if there is a good solution at the moment.

Originally created by @MingHuiLiu on GitHub (Nov 23, 2019). Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/174 Image element cannot display web image. This bug can now be resolved by converting to a local image, but I want to use webview and find that it is not currently supported. I just want to play the video (playing a web video requires a custom cookie header), I don't know if there is a good solution at the moment.
Author
Owner

@pauldotknopf commented on GitHub (Nov 23, 2019):

WebView is supported, it just isn't provided by the pre-compiled Qt runtime (because it's super large).

For more advanced scenarios, I'd recommend: https://qmlnet.github.io/setup/unmanaged-hosting/

<!-- gh-comment-id:557759394 --> @pauldotknopf commented on GitHub (Nov 23, 2019): WebView is supported, it just isn't provided by the pre-compiled Qt runtime (because it's super large). For more advanced scenarios, I'd recommend: https://qmlnet.github.io/setup/unmanaged-hosting/
Author
Owner

@pauldotknopf commented on GitHub (Nov 23, 2019):

Closing, as the Image element is a Qt component, not of this project.

<!-- gh-comment-id:557759431 --> @pauldotknopf commented on GitHub (Nov 23, 2019): Closing, as the ```Image``` element is a Qt component, not of this project.
Author
Owner

@MingHuiLiu commented on GitHub (Nov 27, 2019):

MouseArea does not work🤔

<!-- gh-comment-id:558963854 --> @MingHuiLiu commented on GitHub (Nov 27, 2019): MouseArea does not work🤔
Author
Owner

@pauldotknopf commented on GitHub (Nov 27, 2019):

Post your QML? It's likely just a markup issue.

<!-- gh-comment-id:558964171 --> @pauldotknopf commented on GitHub (Nov 27, 2019): Post your QML? It's likely just a markup issue.
Author
Owner

@MingHuiLiu commented on GitHub (Nov 27, 2019):

import QtQuick 2.11
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Window 2.3
import Features 1.0

import QtMultimedia 5.0
import QtWebView 1.0

ApplicationWindow {
    id: window
    width: 800
    height: 600
    visible: true
    title: "Qml.Net"

            Rectangle{
                border.color: "#ff0000"
                height:500
                width:500

                DropArea{
                    
                height:500
                width:500
            anchors.fill: parent;

            onDropped: {

                if(drop.hasUrls){

                    for(var i = 0; i < drop.urls.length; i++){

                        console.log(drop.urls.length);

                        console.log(drop.urls[i]);

                    }

                }

    }
}
            }

<!-- gh-comment-id:558965041 --> @MingHuiLiu commented on GitHub (Nov 27, 2019): import QtQuick 2.11 import QtQuick.Controls 2.4 import QtQuick.Layouts 1.3 import QtGraphicalEffects 1.0 import QtQuick.Window 2.3 import Features 1.0 import QtMultimedia 5.0 import QtWebView 1.0 ApplicationWindow {     id: window     width: 800     height: 600     visible: true     title: "Qml.Net"             Rectangle{                 border.color: "#ff0000"                 height:500                 width:500                 DropArea{                                      height:500                 width:500             anchors.fill: parent;             onDropped: {                 if(drop.hasUrls){                     for(var i = 0; i < drop.urls.length; i++){                         console.log(drop.urls.length);                         console.log(drop.urls[i]);                     }                 }     } }             }
Author
Owner

@vadi2 commented on GitHub (Nov 27, 2019):

Have a look at https://github.com/qmlnet/qmlnet/issues/142, might be similar!

<!-- gh-comment-id:558975446 --> @vadi2 commented on GitHub (Nov 27, 2019): Have a look at https://github.com/qmlnet/qmlnet/issues/142, might be similar!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/qmlnet#111
No description provided.