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. problem with ColorDialog : plugin cannot be loaded for module "Qt.labs.platform" using qml
Forum Updated to NodeBB v4.3 + New Features

problem with ColorDialog : plugin cannot be loaded for module "Qt.labs.platform" using qml

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 2 Posters 885 Views 1 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.
  • Q Offline
    Q Offline
    qAminzzz
    wrote on last edited by qAminzzz
    #1

    hi, i used below code to use ColorDialog:

    import QtQuick 2.2
    import QtQuick.Controls 2.5
    import Qt.labs.platform 1.1
    
    ApplicationWindow
    {
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
    
        ColorDialog
        {
            id: colorDialog
            title: "Please choose a color"
            onAccepted: {
                console.log("You chose: " + colorDialog.color)
                Qt.quit()
            }
            onRejected: {
                console.log("Canceled")
                Qt.quit()
            }
            Component.onCompleted: visible = true
        }
    }
    
    

    and i got these errors:

    • QQmlApplicationEngine failed to load component*
    • qrc:/main.qml:3:1: plugin cannot be loaded for module "Qt.labs.platform": Cannot load library C:\Qt\5.15.0\mingw81_64\qml\Qt\labs\platform\qtlabsplatformplugin.dll: The specified procedure could not be found.

    im grateful for any help

    Q 1 Reply Last reply
    0
    • Q qAminzzz

      hi, i used below code to use ColorDialog:

      import QtQuick 2.2
      import QtQuick.Controls 2.5
      import Qt.labs.platform 1.1
      
      ApplicationWindow
      {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          ColorDialog
          {
              id: colorDialog
              title: "Please choose a color"
              onAccepted: {
                  console.log("You chose: " + colorDialog.color)
                  Qt.quit()
              }
              onRejected: {
                  console.log("Canceled")
                  Qt.quit()
              }
              Component.onCompleted: visible = true
          }
      }
      
      

      and i got these errors:

      • QQmlApplicationEngine failed to load component*
      • qrc:/main.qml:3:1: plugin cannot be loaded for module "Qt.labs.platform": Cannot load library C:\Qt\5.15.0\mingw81_64\qml\Qt\labs\platform\qtlabsplatformplugin.dll: The specified procedure could not be found.

      im grateful for any help

      Q Offline
      Q Offline
      qAminzzz
      wrote on last edited by
      #2

      @qAminzzz
      hi all again, i copied Qt5Widgets.dll in build directory and it worked

      JonBJ 1 Reply Last reply
      0
      • Q qAminzzz

        @qAminzzz
        hi all again, i copied Qt5Widgets.dll in build directory and it worked

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @qAminzzz
        Does not sound like a good solution: you should never need to copy Qt-supplied libraries to your application's build directory, they are supposed to be found in the system areas.

        Q 2 Replies Last reply
        0
        • JonBJ JonB

          @qAminzzz
          Does not sound like a good solution: you should never need to copy Qt-supplied libraries to your application's build directory, they are supposed to be found in the system areas.

          Q Offline
          Q Offline
          qAminzzz
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • JonBJ JonB

            @qAminzzz
            Does not sound like a good solution: you should never need to copy Qt-supplied libraries to your application's build directory, they are supposed to be found in the system areas.

            Q Offline
            Q Offline
            qAminzzz
            wrote on last edited by
            #5

            @JonB so what i should to do? ):

            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