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. Qml gui is crashing: plugin cannot be loaded for module "QtQuick.Controls".
Forum Updated to NodeBB v4.3 + New Features

Qml gui is crashing: plugin cannot be loaded for module "QtQuick.Controls".

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

    Hello,

    I've upgraded my application from qt 5.12.7 to 5.15.2.

    Currently I'm facing an issue, the gui isn't loading and the logs are given below

    QQmlApplicationEngine failed to load component
    qrc:/main.qml:51:9: Type Header unavailable
    qrc:/Header.qml:70:13: Type Button unavailable
    file:///opt/Qt/5.15/gcc_64/qml/QtQuick/Controls.2/qmldir: plugin cannot be loaded for module "QtQuick.Controls": Cannot install type 'VerticalHeaderView' into protected module 'QtQuick.Controls' version '2'
    <Unknown File>: Cannot install type 'HorizontalHeaderView' into protected module 'QtQuick.Controls' version '2'
    <Unknown File>: Cannot install element 'SplitHandle' into protected module 'QtQuick.Controls' version '2'
    <Unknown File>: Cannot install type 'SplitView' into protected module 'QtQuick.Controls' version '2'
    <Unknown File>: Cannot install element 'Overlay' into protected module 'QtQuick.Controls' version '2'
    <Unknown File>: Cannot install type 'MenuBarItem' into protected module 'QtQuick.Controls' version '2'
    <Unknown File>: Cannot install type 'MenuBar' into protected module 'QtQuick.Controls' version '2'
    <Unknown File>: Cannot install type 'ActionGroup' into protected module 'QtQuick.Controls' version '2'
    <Unknown File>: Cannot install type 'Action' into protected module 'QtQuick.Controls' version '2'
    
    

    Can someone help to solve it. My qml imports looks this

    import QtQuick 2.12
    import QtQuick.Window 2.12
    import QtQuick.Controls 2.12
    
    1 Reply Last reply
    0
    • A Offline
      A Offline
      alex_malyu
      wrote on last edited by
      #2

      If it is during attempt to debug in QtCreator - it is a bug, cause plugins are not found when they should be, and I have the same issue.
      If it is when you run application outside of QTCreator you need to make sure plugins are deployed and can be found by application.

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

        I've finally managed to find the issue. There is a duplicate QtQuick and Qt folder were created inside my build directory.
        I think somehow the QtQuick controls was accessing this duplicate directories instead the real one. I've managed to fix it by removing the duplicated directory from build folder, and now it works. Thanks @alex_malyu for your response.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved