Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Lots of errors when using qml type compiler via the cmake api
Forum Updated to NodeBB v4.3 + New Features

Lots of errors when using qml type compiler via the cmake api

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 491 Views
  • 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.
  • I Offline
    I Offline
    im_him_dev
    wrote on last edited by
    #1

    I am making a qt6 application with qml for the GUI and I wanted to use the qml type compiler to compile it into C++ just to optimize the program. However, during compile time, I get a lot of errors when the build process tries to compile these C++ qml files and the moc c++ qml files. I checked my C++ and QML files and they seem to have no mistake, here is the cmake I am using:

    cmake_minimum_required(VERSION 3.16)
    
    project(ClickerX VERSION 1.0.0 LANGUAGES CXX)
    
    set(CMAKE_CXX_STANDARD 17)
    set(CMAKE_CXX_STANDARD_REQUIRED ON)
    set(CMAKE_PREFIX_PATH "C:/Qt/6.6.1/msvc2019_64")
    
    find_package(Qt6 REQUIRED COMPONENTS Gui Qml Quick QuickControls2 QuickTemplates2)
    qt_standard_project_setup()
    
    qt_add_executable(ClickerX
        src/main.cpp
    )
    
    set_source_files_properties(src/main.qml PROPERTIES QT_RESOURCE_ALIAS main.qml)
    set_source_files_properties(src/components/NumberField.qml PROPERTIES QT_RESOURCE_ALIAS components/NumberField.qml)
    
    qt_add_qml_module(ClickerX
        URI qml
        RESOURCE_PREFIX /
        QML_FILES
            src/main.qml
            src/components/NumberField.qml
        ENABLE_TYPE_COMPILER
    )
    
    target_link_libraries(ClickerX PRIVATE Qt6::Gui Qt6::Qml Qt6::QmlPrivate Qt6::QuickPrivate Qt6::QuickControls2Private Qt6::QuickTemplates2Private)
    set_target_properties(ClickerX PROPERTIES
        WIN32_EXECUTABLE ON
    )
    

    I am using MSVC build tools to compile this project.
    Here is the long build output:

    [main] Building folder: ClickerX 
    [build] Starting build
    [proc] Executing command: C:\Qt\Tools\CMake_64\bin\cmake.EXE --build c:/Users/athar/Documents/ClickerX/build --config Debug --target ClickerX -j 18 --
    [build] MSBuild version 17.8.3+195e7f5a3 for .NET Framework
    [build] 
    [build]   1>Checking Build System
    [build]   Building Custom Rule C:/Users/athar/Documents/ClickerX/CMakeLists.txt
    [build]   Building Custom Rule C:/Users/athar/Documents/ClickerX/CMakeLists.txt
    [build]   1>Automatic MOC and UIC for target ClickerX
    [build]   Building Custom Rule C:/Users/athar/Documents/ClickerX/CMakeLists.txt
    [build]   Running AUTOMOC file extraction for target ClickerX
    [build]   Building Custom Rule C:/Users/athar/Documents/ClickerX/CMakeLists.txt
    [build]   Automatic QML type registration for target ClickerX
    [build]   Building Custom Rule C:/Users/athar/Documents/ClickerX/CMakeLists.txt
    [build]   Generating .rcc/qmlcache/ClickerX_src/main_qml.cpp
    [build]   Generating .rcc/qmlcache/ClickerX_src/components/NumberField_qml.cpp
    [build]   Compiling src/main.qml with qmltc
    [build]   Compiling src/components/NumberField.qml with qmltc
    [build]   Generating .qmltc/ClickerX/moc_main.cpp
    [build]   Generating .qmltc/ClickerX/moc_numberfield.cpp
    [build]   mocs_compilation_Debug.cpp
    [build]   qrc_qmake_qml.cpp
    [build]   ClickerX_qmlcache_loader.cpp
    [build]   main_qml.cpp
    [build]   NumberField_qml.cpp
    [build]   qrc_ClickerX_raw_qml_0.cpp
    [build]   numberfield.cpp
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(41,28): error C2504: 'TextField': base class undefined [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   (compiling source file '.qmltc/ClickerX/numberfield.cpp')
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(76,54): error C2065: 'TextField': undeclared identifier [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   (compiling source file '.qmltc/ClickerX/numberfield.cpp')
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(76,44): error C2672: 'QQmltcObjectCreationHelper::typeCount': no matching overloaded function found [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   (compiling source file '.qmltc/ClickerX/numberfield.cpp')
    [build]   C:\Qt\6.6.1\msvc2019_64\include\QtQml\6.6.1\QtQml\private\qqmltcobjectcreationhelper_p.h(82,27):
    [build]   could be 'uint QQmltcObjectCreationHelper::typeCount(void) noexcept'
    [build]   	C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(76,54):
    [build]   	'QQmltcObjectCreationHelper::typeCount': invalid template argument for 'T', type expected
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(74,29): error C3615: constexpr function 'qml::NumberField::q_qmltc_typeCount' cannot result in a constant expression [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   (compiling source file '.qmltc/ClickerX/numberfield.cpp')
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(74,29):
    [build]   failure was caused by control reaching the end of a constexpr function
    [build]   
    [build] C:\Qt\6.6.1\msvc2019_64\include\QtQml\6.6.1\QtQml\private\qqmltcobjectcreationhelper_p.h(98,67): error C2975: '_Size': invalid template argument for 'std::array', expected compile-time constant expression [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   (compiling source file '.qmltc/ClickerX/numberfield.cpp')
    [build]   C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\array(405,34):
    [build]   see declaration of '_Size'
    [build]   C:\Qt\6.6.1\msvc2019_64\include\QtQml\6.6.1\QtQml\private\qqmltcobjectcreationhelper_p.h(98,67):
    [build]   the template instantiation context (the oldest one first) is
    [build]   	C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(30,43):
    [build]   	see reference to class template instantiation 'QQmltcObjectCreationBase<qml::NumberField>' being compiled
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(32,12): error C2664: 'void QQmltcObjectCreationHelper::set(qsizetype,QObject *)': cannot convert argument 2 from 'qml::NumberField *' to 'QObject *' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(32,20):
    [build]   Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
    [build]   C:\Qt\6.6.1\msvc2019_64\include\QtQml\6.6.1\QtQml\private\qqmltcobjectcreationhelper_p.h(73,10):
    [build]   see declaration of 'QQmltcObjectCreationHelper::set'
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(32,12):
    [build]   while trying to match the argument list '(int, qml::NumberField *)'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(38,5): error C2614: 'qml::NumberField': illegal member initialization: 'TextField' is not a base or member [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(50,15): error C2653: 'TextField': is not a class or namespace name [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(57,10): error C2664: 'void QQmlEnginePrivate::setInternalContext(QObject *,const QQmlRefPointer<QQmlContextData> &,QQmlContextData::QmlObjectKind)': cannot convert argument 1 from 'qml::NumberField *' to 'QObject *' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(57,31):
    [build]   Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
    [build]   C:\Qt\6.6.1\msvc2019_64\include\QtQml\6.6.1\QtQml\private\qqmlengine_p.h(240,17):
    [build]   see declaration of 'QQmlEnginePrivate::setInternalContext'
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(57,10):
    [build]   while trying to match the argument list '(qml::NumberField *, QQmlRefPointer<QQmlContextData>, QQmlContextData::QmlObjectKind)'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(58,12): error C2664: 'void QQmlContextData::setContextObject(QObject *)': cannot convert argument 1 from 'qml::NumberField *' to 'QObject *' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(58,31):
    [build]   Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
    [build]   C:\Qt\6.6.1\msvc2019_64\include\QtQml\6.6.1\QtQml\private\qqmlcontextdata_p.h(129,10):
    [build]   see declaration of 'QQmlContextData::setContextObject'
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(58,12):
    [build]   while trying to match the argument list '(qml::NumberField *)'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(80,5): error C2653: 'TextField': is not a class or namespace name [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(84,11): error C2039: 'setBottomPadding': is not a member of 'qml::NumberField' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(41,7):
    [build]   see declaration of 'qml::NumberField'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(85,11): error C2039: 'setTopPadding': is not a member of 'qml::NumberField' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(41,7):
    [build]   see declaration of 'qml::NumberField'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(86,34): error C2039: 'font': is not a member of 'qml::NumberField' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(41,7):
    [build]   see declaration of 'qml::NumberField'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(90,77): error C3536: 'this_group_font': cannot be used before it is initialized [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(101,11): error C2039: 'setFont': is not a member of 'qml::NumberField' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(41,7):
    [build]   see declaration of 'qml::NumberField'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(112,5): error C2653: 'TextField': is not a class or namespace name [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(116,42): error C2039: 'textChanged': is not a member of 'qml::NumberField' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(41,7):
    [build]   see declaration of 'qml::NumberField'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(116,42): error C2065: 'textChanged': undeclared identifier [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(117,43): error C2664: 'void QQmlCppBinding::createBindingForNonBindable(const QV4::ExecutableCompilationUnit *,QObject *,qsizetype,QObject *,int,int,const QString &)': cannot convert argument 2 from 'qml::NumberField *' to 'QObject *' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(117,157):
    [build]   Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
    [build]   C:\Qt\6.6.1\msvc2019_64\include\QtQml\6.6.1\QtQml\private\qqmlcppbinding_p.h(43,17):
    [build]   see declaration of 'QQmlCppBinding::createBindingForNonBindable'
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(117,43):
    [build]   while trying to match the argument list '(QV4::ExecutableCompilationUnit *, qml::NumberField *, int, qml::NumberField *, int, int, QString)'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(118,43): error C2664: 'void QQmlCppBinding::createBindingForNonBindable(const QV4::ExecutableCompilationUnit *,QObject *,qsizetype,QObject *,int,int,const QString &)': cannot convert argument 2 from 'qml::NumberField *' to 'QObject *' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(118,157):
    [build]   Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
    [build]   C:\Qt\6.6.1\msvc2019_64\include\QtQml\6.6.1\QtQml\private\qqmlcppbinding_p.h(43,17):
    [build]   see declaration of 'QQmlCppBinding::createBindingForNonBindable'
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(118,43):
    [build]   while trying to match the argument list '(QV4::ExecutableCompilationUnit *, qml::NumberField *, int, qml::NumberField *, int, int, QString)'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(129,5): error C2653: 'TextField': is not a class or namespace name [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(134,71): error C2607: static assertion failed [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(135,15): error C2039: 'classBegin': is not a member of 'qml::NumberField' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(41,7):
    [build]   see declaration of 'qml::NumberField'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(147,5): error C2653: 'TextField': is not a class or namespace name [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(152,71): error C2607: static assertion failed [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(153,15): error C2039: 'componentComplete': is not a member of 'qml::NumberField' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(41,7):
    [build]   see declaration of 'qml::NumberField'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(165,5): error C2653: 'TextField': is not a class or namespace name [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(177,5): error C2653: 'TextField': is not a class or namespace name [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(186,51): error C2664: 'QQmlEngine *qmlEngine(const QObject *)': cannot convert argument 1 from 'qml::NumberField *' to 'const QObject *' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(186,61):
    [build]   Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
    [build]   C:\Qt\6.6.1\msvc2019_64\include\QtQml\qqml.h(636,26):
    [build]   see declaration of 'qmlEngine'
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(186,51):
    [build]   while trying to match the argument list '(qml::NumberField *)'
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(189,6): error C2665: 'QQmlEnginePrivate::executeRuntimeFunction': no overloaded function could convert all the argument types [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Qt\6.6.1\msvc2019_64\include\QtQml\6.6.1\QtQml\private\qqmlengine_p.h(232,10):
    [build]   could be 'void QQmlEnginePrivate::executeRuntimeFunction(const QV4::ExecutableCompilationUnit *,qsizetype,QObject *,int,void **,QMetaType *)'
    [build]   	C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(189,6):
    [build]   	'void QQmlEnginePrivate::executeRuntimeFunction(const QV4::ExecutableCompilationUnit *,qsizetype,QObject *,int,void **,QMetaType *)': cannot convert argument 1 from 'const QUrl' to 'const QV4::ExecutableCompilationUnit *'
    [build]   		C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(189,57):
    [build]   		No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    [build]   C:\Qt\6.6.1\msvc2019_64\include\QtQml\6.6.1\QtQml\private\qqmlengine_p.h(230,10):
    [build]   or       'void QQmlEnginePrivate::executeRuntimeFunction(const QUrl &,qsizetype,QObject *,int,void **,QMetaType *)'
    [build]   	C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(189,6):
    [build]   	'void QQmlEnginePrivate::executeRuntimeFunction(const QUrl &,qsizetype,QObject *,int,void **,QMetaType *)': cannot convert argument 3 from 'qml::NumberField *' to 'QObject *'
    [build]   		C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(189,64):
    [build]   		Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.cpp(189,6):
    [build]   while trying to match the argument list '(const QUrl, int, qml::NumberField *, int, void *[1], QMetaType [1])'
    [build]   
    [build]   moc_main.cpp
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\main.h(19,10): error C1083: Cannot open include file: 'private/qquicklayout_p.h': No such file or directory [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   (compiling source file '.qmltc/ClickerX/moc_main.cpp')
    [build]   
    [build]   moc_numberfield.cpp
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(41,28): error C2504: 'TextField': base class undefined [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   (compiling source file '.qmltc/ClickerX/moc_numberfield.cpp')
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(76,54): error C2065: 'TextField': undeclared identifier [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   (compiling source file '.qmltc/ClickerX/moc_numberfield.cpp')
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(76,44): error C2672: 'QQmltcObjectCreationHelper::typeCount': no matching overloaded function found [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   (compiling source file '.qmltc/ClickerX/moc_numberfield.cpp')
    [build]   C:\Qt\6.6.1\msvc2019_64\include\QtQml\6.6.1\QtQml\private\qqmltcobjectcreationhelper_p.h(82,27):
    [build]   could be 'uint QQmltcObjectCreationHelper::typeCount(void) noexcept'
    [build]   	C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(76,54):
    [build]   	'QQmltcObjectCreationHelper::typeCount': invalid template argument for 'T', type expected
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(74,29): error C3615: constexpr function 'qml::NumberField::q_qmltc_typeCount' cannot result in a constant expression [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   (compiling source file '.qmltc/ClickerX/moc_numberfield.cpp')
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\numberfield.h(74,29):
    [build]   failure was caused by control reaching the end of a constexpr function
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\moc_numberfield.cpp(104,34): error C2653: 'TextField': is not a class or namespace name [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\moc_numberfield.cpp(103,49): error C2737: 'staticMetaObject': const object must be initialized [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\moc_numberfield.cpp(121,20): error C2440: 'static_cast': cannot convert from 'QObject *' to 'qml::NumberField *' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\moc_numberfield.cpp(121,20):
    [build]   Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
    [build]   
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\moc_numberfield.cpp(122,15): error C3536: '_t': cannot be used before it is initialized [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\moc_numberfield.cpp(141,12): error C2653: 'TextField': is not a class or namespace name [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\moc_numberfield.cpp(146,11): error C2653: 'TextField': is not a class or namespace name [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build] C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\moc_numberfield.cpp(151,13): error C2664: 'void qml::NumberField::qt_static_metacall(QObject *,QMetaObject::Call,int,void **)': cannot convert argument 1 from 'qml::NumberField *' to 'QObject *' [C:\Users\athar\Documents\ClickerX\build\ClickerX.vcxproj]
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\moc_numberfield.cpp(151,32):
    [build]   Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\moc_numberfield.cpp(118,24):
    [build]   see declaration of 'qml::NumberField::qt_static_metacall'
    [build]   C:\Users\athar\Documents\ClickerX\build\.qmltc\ClickerX\moc_numberfield.cpp(151,13):
    [build]   while trying to match the argument list '(qml::NumberField *, QMetaObject::Call, int, void **)'
    [build]   
    [build]   Generating Code...
    [proc] The command: C:\Qt\Tools\CMake_64\bin\cmake.EXE --build c:/Users/athar/Documents/ClickerX/build --config Debug --target ClickerX -j 18 -- exited with code: 1
    [driver] Build completed: 00:00:59.454
    [build] Build finished with exit code 1
    

    I would appreciate it if someone would help me out in this situation and show me how to resolve these errors, thank you.

    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