Skip to content
  • 143k Topics
    719k Posts
    KoryK
    I think I've found a solution, the problem was the CmakeLists file cmake_minimum_required(VERSION 3.16) find_package(Qt6 REQUIRED COMPONENTS Quick QuickControls2) qt_add_qml_module(authentication_module URI AuthenticationModule VERSION 1.0 RESOURCE_PREFIX /qt/qml QML_FILES qml/UseLogin.qml SOURCES src/LoginManager.cpp include/auth/LoginManager.hpp ) # Now configure the created target target_include_directories(authentication_module PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include/auth ) target_link_libraries(authentication_module PRIVATE Qt6::Quick Qt6::QuickControls2 ) Needed target_include_directories with path to header file folder (auth) and parent folder to it too (include), target_link_libraries after qt_add_qml_module. Was able to remove "qt_add_library" and NO_PLUGIN. And I believe I needed header file in SOURCES of qt_add_qml_module Without latter one target_include_directories(authentication_module PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include/auth ) build/Android-Debug/AuthenticationModule/authentication_module_qmltyperegistrations.cpp:23:34: error: use of undeclared identifier 'auth' 23 | qmlRegisterTypesAndRevisions<auth::LoginManager>("AuthenticationModule", 1); | ^ 1 error generated. Without former one in associated cpp file projects\testapp\AuthenticationModule\src\LoginManager.cpp:1: error: 'auth/LoginManager.hpp' file not found projects/testapp/AuthenticationModule/src/LoginManager.cpp:1:10: fatal error: 'auth/LoginManager.hpp' file not found 1 | #include "auth/LoginManager.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~ :-1: error: ninja: build stopped: subcommand failed. projects\testapp\AuthenticationModule\src\LoginManager.cpp:1: error: 'auth/LoginManager.hpp' file not found projects\testapp\AuthenticationModule\src\LoginManager.cpp:4: error: Expected namespace name projects\testapp\AuthenticationModule\src\LoginManager.cpp:6: error: Use of undeclared identifier 'LoginManager' projects\testapp\AuthenticationModule\src\LoginManager.cpp:11: error: Use of undeclared identifier 'LoginManager' I could, however, just change header reference in .cpp file to this (adding "include/") in order to stop that from complaining but I think that's a worse approach with lots of cpp files #include "include/auth/LoginManager.hpp"
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k Topics
    23k Posts
    I
    i have overridden the paint event to do what i need. thank you very much for your help! it works now
  • Everything related to designing and design tools

    129 392
    129 Topics
    392 Posts
    J
    Using QT Designer might be the simpler route if the main goal is to keep the workflow smooth with Python. QT Design Studio projects often need manual adjustments before they run properly under PySide6.
  • Everything related to the QA Tools

    83 224
    83 Topics
    224 Posts
    B
    I have had a problem when editing the names.py manually in that Squish no longer recognises the object. I now delete the object and re-enter it after using the picker tool then add to object map. Not sure if this is what you meant, but hopefully this helps
  • Everything related to learning Qt.

    389 2k
    389 Topics
    2k Posts
    U
    @veerbhan I would recommend you to add with us (Me and Lehomar2vinci).
  • 2k Topics
    13k Posts
    Christian EhrlicherC
    @stash22 said in Why does QTextStream::pos() return -1 while reading a file line-by-line in Qt?: m_readNmeaTextStream.pos() becomes -1. The documentation states this: https://doc.qt.io/qt-6/qtextstream.html#pos
  • 4k Topics
    18k Posts
    L
    Sto sviluppando un software gestionale e mi collego ad un database mysql tramite ODBC perché non riesco a collegare mysql a qt. Uso qmake e non cmake. Qualcuno mi può aiutare ?
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k Topics
    10k Posts
    N
    Please kindly change it to “ntninja”. The old name has SHA-256 hash “27f1e1e6277cc13bfc65294c7af80d2d6bbe23c42eb2ed426547fbe6311e55c4” (no newline in input) and shall not be named, thank you.