[GH-ISSUE #74] Problem with open file dialog. #46

Closed
opened 2026-05-05 11:01:12 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @pauldotknopf on GitHub (Sep 29, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/74

This was reported on Gitter.

import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 2.3
import QtQuick.Dialogs 1.3

Window {
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")

    Text {
        id: text1
        x: 127
        y: 99
        width: 201
        height: 29
        text: qsTr("")
        font.pixelSize: 12
    }

    Text {
        id: text2
        x: 127
        y: 68
        text: qsTr("CurrentValue")
        font.pixelSize: 12
    }

    Button {
        id: addButton
        x: 141
        y: 167
        text: qsTr("Add 1")

        onClicked: {
            fileDialog.open()
        }
    }

    FileDialog {
        id: fileDialog
        title: qsTr("File name")
    folder: shortcuts.home
    selectFolder: true
    onAccepted: {

        }
    }
}
QQmlApplicationEngine failed to load component
file:///C:/Users/Emmanuel Hansen/Documents/Visual Studio 2017/Projects/QMLManagedMode/QMLManagedMode/bin/Debug/netcoreapp2.1/main.qml:41 Type FileDialog unavailable
file:///C:/Users/Emmanuel Hansen/.nuget/packages/qml.net.windowsbinaries/0.6.0/runtimes/win-x64/native/qml/QtQuick/Dialogs/DefaultFileDialog.qml:41 plugin cannot be loaded for module "QtQuick.Controls": Cannot load library C:\Users\Emmanuel Hansen\.nuget\packages\qml.net.windowsbinaries\0.6.0\runtimes\win-x64\native\qml\QtQuick\Controls\qtquickcontrolsplugin.dll: The specified module could not be found.

Turns out our Nuget package wasn't deploying all the needed dependencies.

Originally created by @pauldotknopf on GitHub (Sep 29, 2018). Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/74 This was reported on Gitter. ```qml import QtQuick 2.9 import QtQuick.Window 2.2 import QtQuick.Controls 2.3 import QtQuick.Dialogs 1.3 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Text { id: text1 x: 127 y: 99 width: 201 height: 29 text: qsTr("") font.pixelSize: 12 } Text { id: text2 x: 127 y: 68 text: qsTr("CurrentValue") font.pixelSize: 12 } Button { id: addButton x: 141 y: 167 text: qsTr("Add 1") onClicked: { fileDialog.open() } } FileDialog { id: fileDialog title: qsTr("File name") folder: shortcuts.home selectFolder: true onAccepted: { } } } ``` ``` QQmlApplicationEngine failed to load component file:///C:/Users/Emmanuel Hansen/Documents/Visual Studio 2017/Projects/QMLManagedMode/QMLManagedMode/bin/Debug/netcoreapp2.1/main.qml:41 Type FileDialog unavailable file:///C:/Users/Emmanuel Hansen/.nuget/packages/qml.net.windowsbinaries/0.6.0/runtimes/win-x64/native/qml/QtQuick/Dialogs/DefaultFileDialog.qml:41 plugin cannot be loaded for module "QtQuick.Controls": Cannot load library C:\Users\Emmanuel Hansen\.nuget\packages\qml.net.windowsbinaries\0.6.0\runtimes\win-x64\native\qml\QtQuick\Controls\qtquickcontrolsplugin.dll: The specified module could not be found. ``` Turns out our Nuget package wasn't deploying all the needed dependencies.
Author
Owner

@pauldotknopf commented on GitHub (Sep 29, 2018):

Reported by @emmauss

<!-- gh-comment-id:425602987 --> @pauldotknopf commented on GitHub (Sep 29, 2018): Reported by @emmauss
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#46
No description provided.