Results 1 to 2 of 2

Thread: Qt WebView module with Qt Quick results in DXGI ERROR: CreateDXGIFactory

  1. #1
    Join Date
    May 2024
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Exclamation Qt WebView module with Qt Quick results in DXGI ERROR: CreateDXGIFactory

    Hello!
    I'm trying to run Qt WebView Example - Minibrowser on Qt 6.7.1(Microsoft Visual C++ Compiler 15.9.28307.1745 (amd64)) for Windows 11 (build 10.0.22631 home)
    The code is taken from the official example http://doc.qt.io/qt-4.8/https://doc.qt.io/qt-6/qtwebview-minibrowser-example.html

    Any attempts result in an error:
    DXGI ERROR: CreateDXGIFactory cannot be called from DllMain. [MISCELLANEOUS ERROR #76:]

    What can be done to solve the problem?

    The code:
    Qt Code:
    1. [/QTCLASS]// Copyright (C) 2017 The Qt Company Ltd.
    2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
    3.  
    4. #include <QtCore/QUrl>
    5. #include <QtCore/QCommandLineOption>
    6. #include <QtCore/QCommandLineParser>
    7. #include <QGuiApplication>
    8. #include <QStyleHints>
    9. #include <QScreen>
    10. #include <QQmlApplicationEngine>
    11. #include <QtQml/QQmlContext>
    12. #include <QtWebView/QtWebView>
    13.  
    14.  
    15. #include "main.moc"
    16.  
    17. int main(int argc, char *argv[])
    18. {
    19. //! [0]
    20. QtWebView::initialize();
    21. QGuiApplication app(argc, argv);
    22.  
    23. //! [0]
    24. QGuiApplication::setApplicationDisplayName(QCoreApplication::translate("main",
    25. "QtWebView Example"));
    26. QCommandLineParser parser;
    27. QCoreApplication::setApplicationVersion(QT_VERSION_STR);
    28. parser.setApplicationDescription(QGuiApplication::applicationDisplayName());
    29. parser.addHelpOption();
    30. parser.addVersionOption();
    31. parser.addPositionalArgument("url", "The initial URL to open.");
    32. QStringList arguments = app.arguments();
    33. parser.process(arguments);
    34. const QString initialUrl = parser.positionalArguments().isEmpty() ?
    35. QStringLiteral("https://www.qt.io") : parser.positionalArguments().first();
    36.  
    37. QQmlApplicationEngine engine;
    38. QQmlContext *context = engine.rootContext();
    39. context->setContextProperty(QStringLiteral("utils"), new Utils(&engine));
    40. context->setContextProperty(QStringLiteral("initialUrl"),
    41. Utils::fromUserInput(initialUrl));
    42. QRect geometry = QGuiApplication::primaryScreen()->availableGeometry();
    43. if (!QGuiApplication::styleHints()->showIsFullScreen()) {
    44. const QSize size = geometry.size() * 4 / 5;
    45. const QSize offset = (geometry.size() - size) / 2;
    46. const QPoint pos = geometry.topLeft() + QPoint(offset.width(), offset.height());
    47. geometry = QRect(pos, size);
    48. }
    49. context->setContextProperty(QStringLiteral("initialX"), geometry.x());
    50. context->setContextProperty(QStringLiteral("initialY"), geometry.y());
    51. context->setContextProperty(QStringLiteral("initialWidth"), geometry.width());
    52. context->setContextProperty(QStringLiteral("initialHeight"), geometry.height());
    53.  
    54. engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
    55. if (engine.rootObjects().isEmpty())
    56. return -1;
    57.  
    58. return app.exec();
    59. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    May 2024
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt WebView module with Qt Quick results in DXGI ERROR: CreateDXGIFactory

    It looks like the problem has already been resolved in version 6.8.0
    https://bugreports.qt.io/browse/QTBU...DXGIFactory%22

Similar Threads

  1. Compiling Qt3D results in error
    By karpt in forum Newbie
    Replies: 2
    Last Post: 19th January 2016, 21:38
  2. Project ERROR: Unknow module(s) in QT: quick
    By Danilo in forum Qt Quick
    Replies: 6
    Last Post: 11th October 2014, 11:45
  3. Replies: 3
    Last Post: 5th September 2014, 12:58
  4. Project ERROR: Unknown module(s) in QT: quick
    By Raghaw in forum Qt Quick
    Replies: 0
    Last Post: 4th December 2013, 05:56
  5. webview custom error pages
    By wambagilles in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2011, 08:49

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.