Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Issue with Qt WebEngine, Missing DLLs, and Creating EXE Installer
Forum Updated to NodeBB v4.3 + New Features

Issue with Qt WebEngine, Missing DLLs, and Creating EXE Installer

Scheduled Pinned Locked Moved Solved General and Desktop
13 Posts 4 Posters 619 Views 2 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.
  • M MyNameIsQt
    15 Mar 2025, 16:49

    @Axel-Spoerl I can create an installer.exe using Inno Setup Compiler. However, the HTML, which is the main component of the application, is not displaying. I can't find Qt6WebEngine, is it no longer in use? How can I resolve the issue of the HTML not displaying?

    The following DLLs are present:

    Qt6Core.dll
    Qt6Gui.dll
    Qt6Network.dll
    Qt6OpenGl.dll
    Qt6Positioning.dll
    Qt6Qml.dll
    QmlModels.dll
    QmlWorkerScript.dll
    Quick.dll
    Quick3DUtils.dll
    QuickWidgets.dll
    Qt6SerialPort.dll
    Qt6Svg.dll
    Qt6VirtualKeyboard.dll
    Qt6WebChannel.dll
    Qt6WebEngineCore.dll
    Qt6WebEngineWidgets.dll
    Qt6Widgets.dll
    QtWebEngineProcess.exe

    Thanks a lot.

    S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 15 Mar 2025, 16:52 last edited by
    #4

    @MyNameIsQt hi,

    Did you run windeployqt before packing things with innosetup ?

    These dlls alone are not all. There are plugins, QML files, etc.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    M 2 Replies Last reply 15 Mar 2025, 17:15
    0
    • S SGaist
      15 Mar 2025, 16:52

      @MyNameIsQt hi,

      Did you run windeployqt before packing things with innosetup ?

      These dlls alone are not all. There are plugins, QML files, etc.

      M Offline
      M Offline
      MyNameIsQt
      wrote on 15 Mar 2025, 17:15 last edited by
      #5
      This post is deleted!
      1 Reply Last reply
      0
      • S SGaist
        15 Mar 2025, 16:52

        @MyNameIsQt hi,

        Did you run windeployqt before packing things with innosetup ?

        These dlls alone are not all. There are plugins, QML files, etc.

        M Offline
        M Offline
        MyNameIsQt
        wrote on 15 Mar 2025, 17:17 last edited by
        #6

        @SGaist Yes, I ran windeployqt using Qt 6.8.2 (MSVC 2022 64-bit) before packaging the application.

        I used windeployqt to deploy the necessary Qt libraries, plugins, QML files, and other dependencies required for the application to run correctly on the target system. This ensures that all the essential files are included for proper execution.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 15 Mar 2025, 19:38 last edited by
          #7

          To clear thing up: are you able to start the application properly from the explorer once you have run windeployqt ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          M 2 Replies Last reply 16 Mar 2025, 05:41
          0
          • S SGaist
            15 Mar 2025, 19:38

            To clear thing up: are you able to start the application properly from the explorer once you have run windeployqt ?

            M Offline
            M Offline
            MyNameIsQt
            wrote on 16 Mar 2025, 05:41 last edited by
            #8

            @SGaist No, after running windeployqt, the application does not display the HTML content. However, other functionalities, such as opening and saving files, seem to work fine.

            1 Reply Last reply
            0
            • S SGaist
              15 Mar 2025, 19:38

              To clear thing up: are you able to start the application properly from the explorer once you have run windeployqt ?

              M Offline
              M Offline
              MyNameIsQt
              wrote on 16 Mar 2025, 19:27 last edited by
              #9

              @SGaist Could this issue be caused by a missing Qt6WebEngine.dll? The HTML is not displaying, and I'm wondering if it’s due to the absence of this file.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 16 Mar 2025, 20:11 last edited by
                #10

                Where are you loading your html from ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                M 1 Reply Last reply 17 Mar 2025, 02:06
                0
                • S SGaist
                  16 Mar 2025, 20:11

                  Where are you loading your html from ?

                  M Offline
                  M Offline
                  MyNameIsQt
                  wrote on 17 Mar 2025, 02:06 last edited by MyNameIsQt
                  #11

                  @SGaist
                  What does it mean? Do you mean this?

                  #include <QWebEngineSettings>
                  #include <QWebEngineProfile>
                  #include <QWebEnginePage>
                  
                  MyViewApplication::MyViewApplication(QWidget *parent)
                      : QMainWindow(parent)
                      , ui(new Ui::MyViewApplication)
                      , styleSheet()
                      , windowSizeLabel(nullptr)
                      , m_isCanvasLoaded(false)
                      , webView(new QWebEngineView(this))
                      , channel(new QWebChannel(this))
                      , channelManager(new ChannelManager(this))  
                  {
                      setMinimumSize(960, 640);
                  
                      //setMinimumSize(960, 640);
                      ui->setupUi(this);
                      setCentralWidget(webView);
                  
                      QWebEngineProfile *profile = QWebEngineProfile::defaultProfile();
                      profile->setCachePath("C:/Users/user/Documents/Cache"); 
                      profile->setPersistentStoragePath("C:/Users/user/Documents/indexedDB"); 
                  
                      webView->setPage(new QWebEnginePage(profile, webView));
                  
                      webView->settings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, true);
                      webView->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true);
                      webView->settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true);
                      webView->page()->setDevToolsPage(new QWebEnginePage(this));
                  
                      QString htmlPath = QFileInfo(__FILE__).dir().absolutePath() + "/main.html";
                      QFile file(htmlPath);
                      if (file.exists()) {
                          webView->load(QUrl::fromLocalFile(htmlPath));
                      } else {
                          qDebug() << "Failed to load main.html. File not found.";
                      }
                  
                      webView->page()->setWebChannel(channelManager->getChannel());
                      channelManager->registerObject("MyViewApplication", this);
                  
                      createStatusBar();
                      initResources();
                      showMaximized();
                  
                      QAction *openDevToolsAction = new QAction("Open DevTools", this);
                      connect(openDevToolsAction, &QAction::triggered, this, [this]() {
                  
                          QWebEngineView *devToolsView = new QWebEngineView();
                  
                          devToolsView->setPage(webView->page()->devToolsPage());
                  
                          devToolsView->resize(800, 600); 
                          devToolsView->show();
                      });
                      addAction(openDevToolsAction);
                      openDevToolsAction->setShortcut(QKeySequence("F12"));
                  }
                  
                  

                  main.cpp

                  #include "MyViewApplication.h"
                  
                  #include <QApplication>
                  
                  int main(int argc, char *argv[])
                  {
                      QApplication a(argc, argv);
                      MyViewApplication w;
                      w.show();
                      return a.exec();
                  }
                  
                  
                  J 1 Reply Last reply 17 Mar 2025, 06:15
                  0
                  • M MyNameIsQt
                    17 Mar 2025, 02:06

                    @SGaist
                    What does it mean? Do you mean this?

                    #include <QWebEngineSettings>
                    #include <QWebEngineProfile>
                    #include <QWebEnginePage>
                    
                    MyViewApplication::MyViewApplication(QWidget *parent)
                        : QMainWindow(parent)
                        , ui(new Ui::MyViewApplication)
                        , styleSheet()
                        , windowSizeLabel(nullptr)
                        , m_isCanvasLoaded(false)
                        , webView(new QWebEngineView(this))
                        , channel(new QWebChannel(this))
                        , channelManager(new ChannelManager(this))  
                    {
                        setMinimumSize(960, 640);
                    
                        //setMinimumSize(960, 640);
                        ui->setupUi(this);
                        setCentralWidget(webView);
                    
                        QWebEngineProfile *profile = QWebEngineProfile::defaultProfile();
                        profile->setCachePath("C:/Users/user/Documents/Cache"); 
                        profile->setPersistentStoragePath("C:/Users/user/Documents/indexedDB"); 
                    
                        webView->setPage(new QWebEnginePage(profile, webView));
                    
                        webView->settings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, true);
                        webView->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true);
                        webView->settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true);
                        webView->page()->setDevToolsPage(new QWebEnginePage(this));
                    
                        QString htmlPath = QFileInfo(__FILE__).dir().absolutePath() + "/main.html";
                        QFile file(htmlPath);
                        if (file.exists()) {
                            webView->load(QUrl::fromLocalFile(htmlPath));
                        } else {
                            qDebug() << "Failed to load main.html. File not found.";
                        }
                    
                        webView->page()->setWebChannel(channelManager->getChannel());
                        channelManager->registerObject("MyViewApplication", this);
                    
                        createStatusBar();
                        initResources();
                        showMaximized();
                    
                        QAction *openDevToolsAction = new QAction("Open DevTools", this);
                        connect(openDevToolsAction, &QAction::triggered, this, [this]() {
                    
                            QWebEngineView *devToolsView = new QWebEngineView();
                    
                            devToolsView->setPage(webView->page()->devToolsPage());
                    
                            devToolsView->resize(800, 600); 
                            devToolsView->show();
                        });
                        addAction(openDevToolsAction);
                        openDevToolsAction->setShortcut(QKeySequence("F12"));
                    }
                    
                    

                    main.cpp

                    #include "MyViewApplication.h"
                    
                    #include <QApplication>
                    
                    int main(int argc, char *argv[])
                    {
                        QApplication a(argc, argv);
                        MyViewApplication w;
                        w.show();
                        return a.exec();
                    }
                    
                    
                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 17 Mar 2025, 06:15 last edited by
                    #12

                    @MyNameIsQt said in Issue with Qt WebEngine, Missing DLLs, and Creating EXE Installer:

                    QString htmlPath = QFileInfo(FILE).dir().absolutePath() + "/main.html";

                    How is this going to work?!
                    Either put the HTML file into a recourse file or deploy the HTML file together with the application and construct correct path at runtime using https://doc.qt.io/qt-6/qstandardpaths.html#locate

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    M 1 Reply Last reply 23 Mar 2025, 18:47
                    1
                    • J jsulm
                      17 Mar 2025, 06:15

                      @MyNameIsQt said in Issue with Qt WebEngine, Missing DLLs, and Creating EXE Installer:

                      QString htmlPath = QFileInfo(FILE).dir().absolutePath() + "/main.html";

                      How is this going to work?!
                      Either put the HTML file into a recourse file or deploy the HTML file together with the application and construct correct path at runtime using https://doc.qt.io/qt-6/qstandardpaths.html#locate

                      M Offline
                      M Offline
                      MyNameIsQt
                      wrote on 23 Mar 2025, 18:47 last edited by
                      #13

                      @jsulm Thanks to you, the problem was solved.

                      1 Reply Last reply
                      0
                      • M MyNameIsQt has marked this topic as solved on 23 Mar 2025, 18:48

                      13/13

                      23 Mar 2025, 18:47

                      • Login

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