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. Qt msvc doesn't work for C++ or Python
Forum Updated to NodeBB v4.3 + New Features

Qt msvc doesn't work for C++ or Python

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 251 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.
  • D Offline
    D Offline
    Dot79677
    wrote on last edited by
    #1

    I can’t get Qt6 to work with msvc for C++ or Phyton. I need QWebEngie in my project, I installed newest version (qt 6.8.2 msvc). I installed MS Visua Studio 2022 and redistributable for C++ 2015-2022.

    CMake error:

    "C:\Program Files\JetBrains\CLion 2022.3.1\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2022.3.1/bin/ninja/win/ninja.exe" -DCMAKE_PREFIX_PATH=C:/Qt/6.8.2/msvc2022_64 -G Ninja -S C:\Users\dot\CLionProjects\mBoard-0.1.0 -B C:\Users\dot\CLionProjects\mBoard-0.1.0\build-msvc-1
    -- Qt6 found at: C:/Qt/6.8.2/msvc2022_64/lib/cmake/Qt6
    -- CMAKE_PREFIX_PATH is: C:/Qt/6.8.2/msvc2022_64/
    -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
    -- Qt6Widgets_DIR: C:/Qt/6.8.2/msvc2022_64/lib/cmake/Qt6Widgets
    -- Qt6Widgets found!
    Qt6Widgets_INCLUDE_DIRS: C:/Qt/6.8.2/msvc2022_64/include/QtWidgets;C:/Qt/6.8.2/msvc2022_64/include;C:/Qt/6.8.2/msvc2022_64/include/QtCore;C:/Qt/6.8.2/msvc2022_64/include/QtGui
    CMake Error at CMakeLists.txt:71 (message):
      QWidget not found!
    

    missing vulkan wasn’t a problem with mingw. This projects run well when compiled with mingw.

    Yesterday I installed PyQt6 to see if msvc will work for Python. It doesn’t. It just doesn’t want to work.

    C:\Users\dot\PycharmProjects\Bujo\venv\Scripts\python.exe C:/Users/dot/PycharmProjects/Bujo/main.py
    Traceback (most recent call last):
      File "C:\Users\dot\PycharmProjects\Bujo\main.py", line 2, in <module>
        from PyQt6.QtWebEngineWidgets import QWebEngineView
    ImportError: DLL load failed while importing QtWebEngineWidgets:
    

    This project uses virtual environment and PyQt6 and webengine installed via pip.

    Lines 1-3:

    from PyQt6.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget
    from PyQt6.QtWebEngineWidgets import QWebEngineView
    from PyQt6.QtCore import QUrl
    

    For last few days I’ve tried many things. I don’t know how to solve this. I need qwebengine to work with c++, preferably. Any help or insight will be appreciated.

    jsulmJ 1 Reply Last reply
    0
    • D Dot79677

      I can’t get Qt6 to work with msvc for C++ or Phyton. I need QWebEngie in my project, I installed newest version (qt 6.8.2 msvc). I installed MS Visua Studio 2022 and redistributable for C++ 2015-2022.

      CMake error:

      "C:\Program Files\JetBrains\CLion 2022.3.1\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2022.3.1/bin/ninja/win/ninja.exe" -DCMAKE_PREFIX_PATH=C:/Qt/6.8.2/msvc2022_64 -G Ninja -S C:\Users\dot\CLionProjects\mBoard-0.1.0 -B C:\Users\dot\CLionProjects\mBoard-0.1.0\build-msvc-1
      -- Qt6 found at: C:/Qt/6.8.2/msvc2022_64/lib/cmake/Qt6
      -- CMAKE_PREFIX_PATH is: C:/Qt/6.8.2/msvc2022_64/
      -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) 
      -- Qt6Widgets_DIR: C:/Qt/6.8.2/msvc2022_64/lib/cmake/Qt6Widgets
      -- Qt6Widgets found!
      Qt6Widgets_INCLUDE_DIRS: C:/Qt/6.8.2/msvc2022_64/include/QtWidgets;C:/Qt/6.8.2/msvc2022_64/include;C:/Qt/6.8.2/msvc2022_64/include/QtCore;C:/Qt/6.8.2/msvc2022_64/include/QtGui
      CMake Error at CMakeLists.txt:71 (message):
        QWidget not found!
      

      missing vulkan wasn’t a problem with mingw. This projects run well when compiled with mingw.

      Yesterday I installed PyQt6 to see if msvc will work for Python. It doesn’t. It just doesn’t want to work.

      C:\Users\dot\PycharmProjects\Bujo\venv\Scripts\python.exe C:/Users/dot/PycharmProjects/Bujo/main.py
      Traceback (most recent call last):
        File "C:\Users\dot\PycharmProjects\Bujo\main.py", line 2, in <module>
          from PyQt6.QtWebEngineWidgets import QWebEngineView
      ImportError: DLL load failed while importing QtWebEngineWidgets:
      

      This project uses virtual environment and PyQt6 and webengine installed via pip.

      Lines 1-3:

      from PyQt6.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget
      from PyQt6.QtWebEngineWidgets import QWebEngineView
      from PyQt6.QtCore import QUrl
      

      For last few days I’ve tried many things. I don’t know how to solve this. I need qwebengine to work with c++, preferably. Any help or insight will be appreciated.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Dot79677 said in Qt msvc doesn't work for C++ or Python:

      ImportError: DLL load failed while importing QtWebEngineWidgets:

      What is after this line?
      Also, set QT_DEBUG_PLUGINS env variable and try again to see what the problem is exactly.
      See https://doc.qt.io/qt-6/debug.html for more details.

      "C:\Program Files\JetBrains\CLion 2022.3.1\bin\cmake\win\bin\cmake.exe" - it is better to use cmake.exe provided by the Qt Online INstaller. Also, do you use the MSVC preconfigured terminal to build?

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

      D 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Dot79677 said in Qt msvc doesn't work for C++ or Python:

        ImportError: DLL load failed while importing QtWebEngineWidgets:

        What is after this line?
        Also, set QT_DEBUG_PLUGINS env variable and try again to see what the problem is exactly.
        See https://doc.qt.io/qt-6/debug.html for more details.

        "C:\Program Files\JetBrains\CLion 2022.3.1\bin\cmake\win\bin\cmake.exe" - it is better to use cmake.exe provided by the Qt Online INstaller. Also, do you use the MSVC preconfigured terminal to build?

        D Offline
        D Offline
        Dot79677
        wrote on last edited by
        #3

        @jsulm
        Full error message:

        C:\Users\dot\PycharmProjects\Bujo\venv\Scripts\python.exe C:/Users/dot/PycharmProjects/Bujo/main.py
        Traceback (most recent call last):
          File "C:\Users\dot\PycharmProjects\Bujo\main.py", line 2, in <module>
            from PyQt6.QtWebEngineWidgets import QWebEngineView
        ImportError: DLL load failed while importing QtWebEngineWidgets: Can't find procedure
        
        Process finished with exit code 1
        

        I use msvc to build. Pycharm has venv that I installed a day before I wrote here.
        After installing MS VStudio I noticed that it didn't add anythin to win env vars Path so I added manualy:
        C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin
        C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\bin\Hostx86\x64

        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