跳到內容
  • 143k 主題
    719k 貼文
    Q
    Since weeks I try to build my complete project. Every time i want to use a new library the troubles start from scratch. No I want to use cpr for my http client. I am currently trying to build a Qt6 GUI project for WebAssembly using Emscripten. My setup: Qt 6.8.3 (wasm_singlethread) Emscripten SDK (latest, emcc/em++) CMake 3.31 (via CLion 2025.1.3) Using Qt’s qt.toolchain.cmake and chaining Conan’s toolchain for dependencies (spdlog, cpr, nlohmann_json, …) This is my CMakeLists.txt cmake_minimum_required(VERSION 3.21) project(qt3d_wasm_project VERSION 0.1 LANGUAGES CXX) message(STATUS "CMAKE_SYSTEM_NAME = ${CMAKE_SYSTEM_NAME}") if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten") if(NOT TARGET emscripten_flags) add_library(emscripten_flags INTERFACE) target_link_options(emscripten_flags INTERFACE "SHELL:-sUSE_ZLIB=1" # "SHELL:-sFETCH=1" #maybe i will need this later for crp /libcurl ) endif() if(NOT TARGET GLESv2::GLESv2) add_library(GLESv2::GLESv2 INTERFACE IMPORTED GLOBAL) target_link_options(GLESv2::GLESv2 INTERFACE "SHELL:-sUSE_WEBGL2=1") endif() if(NOT TARGET EGL::EGL) add_library(EGL::EGL INTERFACE IMPORTED GLOBAL) target_link_options(EGL::EGL INTERFACE "SHELL:-sUSE_WEBGL2=1") endif() endif() add_subdirectory(libraries/material_data_lib) if(ENABLE_GUI) find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick Quick3D Qml Quick3DHelpers Network) qt_add_executable(appqt3d resources.qrc main.cpp libraries/material_data_lib/include/IMaterialDataFetcher.h libraries/material_data_lib/src/MaterialDataFactory.cpp ) if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten") target_link_libraries(appqt3d PRIVATE emscripten_flags GLESv2::GLESv2 EGL::EGL) endif() target_link_libraries(appqt3d PRIVATE Qt6::Core Qt6::Gui Qt6::Quick Qt6::Quick3D Qt6::Quick3DHelpers Qt6::Network ) endif() My CMake Options that i use: -DCMAKE_TOOLCHAIN_FILE=/home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake/Qt6/qt.toolchain.cmake -DQT_CHAINLOAD_TOOLCHAIN_FILE=/home/emmynoether/Dokumente/Webseite/MaterialStack/build_wasm/build/Release/generators/conan_toolchain.cmake -DENABLE_GUI=ON -DBUILD_TESTING=OFF -DQt6_DIR=/home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake/Qt6 -DQT_HOST_PATH=/home/emmynoether/Qt/6.8.3/gcc_64 -DQT_DEBUG_FIND_PACKAGE=ON The Output of CMake: -- Could NOT find EGL (missing: HAVE_EGL) (found version "1.5") -- Could NOT find GLESv2 (missing: GLESv2_INCLUDE_DIR GLESv2_LIBRARY HAVE_GLESv2 HAVE_GLESv2) CMake Warning at /home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake/Qt6/Qt6Config.cmake:196 (find_package): Found package configuration file: /home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake but it set Qt6Gui_FOUND to FALSE so package "Qt6Gui" is considered to be NOT FOUND. Reason given by package: Qt6Gui could not be found because dependency GLESv2 could not be found. Configuring with --debug-find-pkg=GLESv2 might reveal details why the package was not found. find_package search path values and other context for the last package that was not found: CMAKE_MODULE_PATH: /home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake/Qt6/platforms;/home/emmynoether/Dokumente/Webseite/MaterialStack/build_wasm/build/Release/generators;/home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake/Qt6;/home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules;/home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake/Qt6/3rdparty/kwin CMAKE_PREFIX_PATH: /home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake;/home/emmynoether/Dokumente/Webseite/MaterialStack/build_wasm/build/Release/generators $ENV{CMAKE_PREFIX_PATH}: CMAKE_FIND_ROOT_PATH: /home/emmynoether/Qt/6.8.3/wasm_singlethread _qt_additional_packages_prefix_paths: _qt_additional_host_packages_prefix_paths: _qt_cmake_dir: /home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake QT_HOST_PATH: /home/emmynoether/Qt/6.8.3/gcc_64 Qt6HostInfo_DIR: /home/emmynoether/Qt/6.8.3/gcc_64/lib/cmake/Qt6HostInfo Qt6_DIR: /home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake/Qt6 CMAKE_TOOLCHAIN_FILE: /home/emmynoether/Qt/6.8.3/wasm_singlethread/lib/cmake/Qt6/qt.toolchain.cmake CMAKE_FIND_ROOT_PATH_MODE_PACKAGE: BOTH CMAKE_SYSROOT: $ENV{PATH}: /home/emmynoether/emsdk/upstream/emscripten:/home/emmynoether/emsdk/node/22.16.0_64bit/bin:/home/emmynoether/.local/bin:/home/emmynoether/.local/bin:/home/emmynoether/.local/bin:/home/emmynoether/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/emmynoether/.dotnet/tools:/home/emmynoether/Downloads/clion-2025.1.3/bin/ninja/linux/x64 Call Stack (most recent call first): CMakeLists.txt:26 (find_package) Even though Qt6GuiConfig.cmake exists in wasm_singlethread/lib/cmake/Qt6Gui/ , it refuses to mark Qt6Gui_FOUND as TRUE because FindWrapGLESv2.cmake did not succeed. Why does Qt6GuiConfig.cmake for WebAssembly still insist on “real” GLESv2/EGL libraries, even though WebAssembly uses WebGL via Emscripten? Is there a recommended way to make Qt6Gui’s dependency resolution happy in a WASM build without hacking its CMake files? thank you
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k 主題
    23k 貼文
    FeRDNYCF
    @Pedro said in Forum Updated NodeBB v4.3 + New features: Profile View Now you get a profilecard snippet by hovering over a user's name/picture. * Only if logged in. (Which probably makes sense, but I just thought I'd point it out. ....After logging in to get the feature working.)
  • Everything related to designing and design tools

    129 391
    129 主題
    391 貼文
    J
    In QT Design Studio, Tab Buttons are mostly for navigation within the UI, but each tab doesn’t automatically hide other content. Usually, a StackView or Loader is needed to switch visible content depending on the active tab.
  • Everything related to the QA Tools

    81 219
    81 主題
    219 貼文
    H
    @IamSumit can you reproduce the issue and share the Support Information logs. Please refer to the following Knowledge Base Article regarding how to obtain the Support Information is https://qatools.knowledgebase.qt.io/misc/collecting-support-info/collecting-support-information-linux-mac-windows/
  • Everything related to learning Qt.

    389 2k
    389 主題
    2k 貼文
    L
    [image: 81cdd613-e1dc-4336-8d29-6b627547d990.png] Shouldn't the padding area be between the red Background and the blue Content item? Why does it here refer to the distance directly from the outside to the content area? Is this correct? Or is my understanding correct? Inset is the distance between a component and the outside, while padding is the distance between the Background and the Content item. I really don't understand this picture; it confuses me.
  • 2k 主題
    13k 貼文
    T
    In qnamespace.h, I add some key_code mappings : For example : enum Key { [...] KEY_CLEYVER_F1 = 0x01002122, // unused Qt keycode map for Cleyver XTremTab8 F1 Key KEY_CLEYVER_F2 = 0x01002121, // unused Qt keycode map for Cleyver XTremTab8 F2 Key [...] } And in androidjniinput, I add switches in static QKeyCombination mapAndroidKey(int key) { [...] switch (key) { case 0x00000122: // XTREMTAB f1 return Qt::KEY_CLEYVER_F1 ; [...] } I have four android keycodes : 0x121, 0x122 (for Cleyver) , 0x1a0 and 0x1a1 (for Crosscall).
  • 4k 主題
    18k 貼文
    GrecKoG
    Le [=] n'étant pas nécessaire ici vu qu'il n'y a rien à capturer dans la lambda. connect(obj1, &MyObject::mySignal , this, [](int arg1){ qDebug() << arg1; });
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k 主題
    10k 貼文
    SGaistS
    Hi, I think you can use https://forum.qt.io/category/5/qt-io-webservices category for this type of question (moved there by the way). Are these in your "unread" section ? Are they marked as you following them ?