Main cpp 2 10 error qqmlapplicationengine file not found

Hi there everyone. I am new here. I am using a Raspberry Pi 3 B+ with the Raspbian Stretch version of Linux. I will be using QT 5.7.1. I am starting up a simple blank GUI application. I get the following issue: /home/pi/QTProgramming/QT_Test02/main.cpp:2: error: QQmlApplicationEngine: No such file or directory The red underlined portion of the main.cpp file is #include I have searched for this error many times on the Google search engine and came up
  • Home
  • Forum
  • Qt
  • Newbie
  • First time with QT: error: QQmlApplicationEngine: No such file or directory

Thread: First time with QT: error: QQmlApplicationEngine: No such file or directory

  1. 5th December 2018, 00:49


    #1

    Default First time with QT: error: QQmlApplicationEngine: No such file or directory

    Hi there everyone. I am new here.

    I am using a Raspberry Pi 3 B+ with the Raspbian Stretch version of Linux. I will be using QT 5.7.1. I am starting up a simple blank GUI application. I get the following issue:

    /home/pi/QTProgramming/QT_Test02/main.cpp:2: error: QQmlApplicationEngine: No such file or directory

    The red underlined portion of the main.cpp file is #include <QQmlApplicationEngine>

    I have searched for this error many times on the Google search engine and came up with no solution. It is probably because I just don’t now this application yet. Please let me know what I can do to get past this.

    — daverzx1 ( Dave )


  2. 19th December 2018, 09:16


    #2

    Default Re: First time with QT: error: QQmlApplicationEngine: No such file or directory

    Quote Originally Posted by daverzx1
    View Post

    /home/pi/QTProgramming/QT_Test02/main.cpp:2: error: QQmlApplicationEngine: No such file or directory

    Does your QMake PRO file contain this?

    1. QT += qml

    To copy to clipboard, switch view to plain text mode 

    In recent documentation every class has this information at the top of its page: QQmlApplicationEngine


Similar Threads

  1. Replies: 3

    Last Post: 29th November 2016, 22:54

  2. Replies: 1

    Last Post: 8th October 2015, 16:27

  3. Replies: 3

    Last Post: 12th March 2015, 21:06

  4. Replies: 2

    Last Post: 17th May 2013, 14:17

  5. Replies: 4

    Last Post: 9th May 2010, 17:18

Tags for this Thread

Bookmarks

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
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules

Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.

Я работаю над проектом Qt, основанным на cmake. Версия Qt — 5.7, Ubuntu 14.04. Я получаю ошибку:

QQmlApplicationEngine failed to load component
qrc:/main.qml:-1 File not found

CMakeLists.txt это:

file(GLOB_RECURSE UI_FILES *.ui)
file(GLOB_RECURSE CODE_FILES *.cpp *.h)

qt5_wrap_ui(UI_HEADERS ${UI_FILES})
qt5_add_resources(RESOURCE_FILES ../resources/resources.qrc)

set(SOURCES
assets/assets.qrc
icons/icons.qrc
qml/qml.qrc)

include(../vendor/CMakeLists.txt)

if (WIN32)
set(WINDOWS_RES_FILE ${CMAKE_CURRENT_BINARY_DIR}/resources.obj)
if (MSVC)
add_custom_command(OUTPUT ${WINDOWS_RES_FILE}
COMMAND rc.exe /fo ${WINDOWS_RES_FILE} resources.rc
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/win
)
else()
add_custom_command(OUTPUT ${WINDOWS_RES_FILE}
COMMAND windres.exe resources.rc ${WINDOWS_RES_FILE}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/win
)
endif()
endif()

add_executable(${CMAKE_PROJECT_NAME}
${SOURCES}
${UI_HEADERS}
${CODE_FILES}
${RESOURCE_FILES}
${WINDOWS_RES_FILE}
${VENDOR_SOURCES}
)

target_link_libraries(${CMAKE_PROJECT_NAME}
Qt5::Core
Qt5::Qml
Qt5::Quick
Qt5::Concurrent
Qt5::Widgets)

find_package( PythonLibs 2.7 REQUIRED )
include_directories( ${PYTHON_INCLUDE_DIRS} )

find_package( Boost COMPONENTS python REQUIRED )
include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIR})

target_link_libraries(${CMAKE_PROJECT_NAME}
${PYTHON_LIBRARIES}
${Boost_LIBRARIES}
${SWORD_LIBRARIES})

include_directories(${SWORD_INCLUDE_DIRS})

set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/data/Info.plist)

if (UNIX)
install(TARGETS ${CMAKE_PROJECT_NAME}
RUNTIME DESTINATION bin)
elseif (WIN32)
install(TARGETS ${CMAKE_PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

Дерево вывода проекта:

.
|-- build
|   |-- CMakeCache.txt
|   |-- CMakeFiles
|   |   |-- 3.6.0-rc4
|   |   |   |-- CMakeCCompiler.cmake
|   |   |   |-- CMakeCXXCompiler.cmake
|   |   |   |-- CMakeDetermineCompilerABI_C.bin
|   |   |   |-- CMakeDetermineCompilerABI_CXX.bin
|   |   |   |-- CMakeSystem.cmake
|   |   |   |-- CompilerIdC
|   |   |   |   |-- a.out
|   |   |   |   `-- CMakeCCompilerId.c
|   |   |   `-- CompilerIdCXX
|   |   |       |-- a.out
|   |   |       `-- CMakeCXXCompilerId.cpp
|   |   |-- cmake.check_cache
|   |   |-- CMakeDirectoryInformation.cmake
|   |   |-- CMakeOutput.log
|   |   |-- CMakeRuleHashes.txt
|   |   |-- CMakeTmp
|   |   |-- feature_tests.bin
|   |   |-- feature_tests.c
|   |   |-- feature_tests.cxx
|   |   |-- Makefile2
|   |   |-- Makefile.cmake
|   |   |-- Progress
|   |   |   |-- 1
|   |   |   |-- 11
|   |   |   |-- 2
|   |   |   |-- 3
|   |   |   `-- count.txt
|   |   |-- progress.marks
|   |   |-- TargetDirectories.txt
|   |   `-- uninstall.dir
|   |       |-- build.make
|   |       |-- cmake_clean.cmake
|   |       |-- DependInfo.cmake
|   |       `-- progress.make
|   |-- cmake_install.cmake
|   |-- CTestTestfile.cmake
|   |-- ecm_uninstall.cmake
|   |-- Makefile
|   |-- source
|   |   |-- __
|   |   |   `-- resources
|   |   |       `-- resources.qrc.depends
|   |   |-- CMakeFiles
|   |   |   |-- CMakeDirectoryInformation.cmake
|   |   |   |-- progress.marks
|   |   |   |-- tutifruti_automoc.dir
|   |   |   |   |-- AutogenInfo.cmake
|   |   |   |   |-- AutomocOldMocDefinitions.cmake
|   |   |   |   |-- build.make
|   |   |   |   |-- cmake_clean.cmake
|   |   |   |   |-- DependInfo.cmake
|   |   |   |   |-- depend.internal
|   |   |   |   |-- depend.make
|   |   |   |   `-- progress.make
|   |   |   `-- tutifruti.dir
|   |   |       |-- __
|   |   |       |   `-- vendor
|   |   |       |       `-- material
|   |   |       |           `-- src
|   |   |       |               `-- core
|   |   |       |-- build.make
|   |   |       |-- cmake_clean.cmake
|   |   |       |-- CXX.includecache
|   |   |       |-- DependInfo.cmake
|   |   |       |-- depend.internal
|   |   |       |-- depend.make
|   |   |       |-- flags.make
|   |   |       |-- link.txt
|   |   |       `-- progress.make
|   |   |-- cmake_install.cmake
|   |   |-- CTestTestfile.cmake
|   |   |-- defines.h
|   |   |-- Makefile
|   |   |-- moc_main_window.cpp
|   |   |-- qrc_resources.cpp
|   |   |-- tutifruti_automoc.cpp
|   |   |-- tutifruti_automoc.dir
|   |   |   `-- vendor
|   |   |       `-- material
|   |   |           `-- src
|   |   |               |-- core
|   |   |               |   |-- moc_device.cpp
|   |   |               |   `-- moc_units.cpp
|   |   |               `-- moc_plugin.cpp
|   |   `-- ui_main_window.h
|   `-- tests
|       |-- CMakeFiles
|       |   |-- CMakeDirectoryInformation.cmake
|       |   `-- progress.marks
|       |-- cmake_install.cmake
|       |-- CTestTestfile.cmake
|       |-- defines.h
|       `-- Makefile
|-- cmake
|   |-- FindCaffe.cmake
|   |-- FindSWORD.cmake
|   `-- LibFindMacros.cmake
|-- CMakeLists.txt
|-- CMakeLists.txt.user
|-- LICENCE
|-- Licence.rtf
|-- README.md
|-- resources
|   |-- icons
|   |   |-- action_home.svg
|   |   |-- action_list.svg
|   |   |-- action_search.svg
|   |   |-- action_settings.svg
|   |   |-- file_cloud_done.svg
|   |   |-- icons.qrc
|   |   |-- maps_place.svg
|   |   |-- navigation_check.svg
|   |   `-- social_school.svg
|   `-- resources.qrc
|-- source
|   |-- assets
|   |   |-- assets.qrc
|   |   |-- book-open-page.svg
|   |   `-- book-open.svg
|   |-- backend
|   |   |-- biblechapter.cpp
|   |   |-- biblechapter.h
|   |   |-- bible.cpp
|   |   |-- bible.h
|   |   |-- biblemanager.cpp
|   |   |-- biblemanager.h
|   |   |-- CMakeLists.txt
|   |   |-- module.cpp
|   |   |-- module.h
|   |   |-- plugin.cpp
|   |   |-- progress.h
|   |   `-- promise.h
|   |-- CMakeLists.txt
|   |-- cpp
|   |-- icons
|   |   |-- action_home.svg
|   |   |-- action_list.svg
|   |   |-- action_search.svg
|   |   |-- action_settings.svg
|   |   |-- file_cloud_done.svg
|   |   |-- icons.qrc
|   |   |-- maps_place.svg
|   |   |-- navigation_check.svg
|   |   `-- social_school.svg
|   |-- icons.yml
|   |-- main.cpp
|   |-- python
|   |   |-- data
|   |   |   |-- external
|   |   |   |-- interim
|   |   |   |-- processed
|   |   |   `-- raw
|   |   |-- docs
|   |   |   |-- commands.rst
|   |   |   |-- conf.py
|   |   |   |-- getting-started.rst
|   |   |   |-- index.rst
|   |   |   |-- make.bat
|   |   |   `-- Makefile
|   |   |-- LICENSE
|   |   |-- Makefile
|   |   |-- models
|   |   |-- notebooks
|   |   |-- README.md
|   |   |-- references
|   |   |-- reports
|   |   |   `-- figures
|   |   |-- requirements.txt
|   |   |-- src
|   |   |   |-- data
|   |   |   |   `-- make_dataset.py
|   |   |   |-- features
|   |   |   |   `-- build_features.py
|   |   |   |-- __init__.py
|   |   |   |-- models
|   |   |   |   |-- predict_model.py
|   |   |   |   `-- train_model.py
|   |   |   `-- visualization
|   |   |       `-- visualize.py
|   |   `-- tox.ini
|   `-- qml
|       |-- components
|       |   |-- BibleView.qml
|       |   |-- Placeholder.qml
|       |   `-- VerseDelegate.qml
|       |-- main.qml
|       |-- qml.qrc
|       `-- ui
|           |-- HomeTab.qml
|           `-- SettingsPage.qml
|-- tests
|   |-- CMakeLists.txt
|   |-- defines.h.cmake
|   `-- example_tests.cpp.example
|-- text.txt
|-- vendor
|   |-- CMakeLists.txt
|   `-- material
|       |-- CHANGELOG.md
|       |-- CONTRIBUTING.md
|       |-- demo
|       |   |-- BottomSheetDemo.qml
|       |   |-- ButtonDemo.qml
|       |   |-- CheckBoxDemo.qml
|       |   |-- ColorPaletteDemo.qml
|       |   |-- CustomIconsDemo.qml
|       |   |-- DatePickerDemo.qml
|       |   |-- demo.pro
|       |   |-- demo.qmlproject
|       |   |-- demo.qrc
|       |   |-- DialogDemo.qml
|       |   |-- FormsDemo.qml
|       |   |-- icons
|       |   |   |-- action_account_circle.svg
|       |   |   |-- action_autorenew.svg
|       |   |   |-- action_delete.svg
|       |   |   |-- action_language.svg
|       |   |   |-- action_settings.svg
|       |   |   |-- alert_warning.svg
|       |   |   |-- communication_email.svg
|       |   |   |-- content_add.svg
|       |   |   |-- content_create.svg
|       |   |   |-- content_forward.svg
|       |   |   |-- device_access_alarm.svg
|       |   |   |-- file_file_download.svg
|       |   |   |-- icons.qrc
|       |   |   |-- image_color_lens.svg
|       |   |   |-- image_edit.svg
|       |   |   |-- maps_place.svg
|       |   |   |-- navigation_arrow_drop_down.svg
|       |   |   `-- social_share.svg
|       |   |-- icons.yml
|       |   |-- images
|       |   |   |-- balloon.jpg
|       |   |   |-- go-last.color.svg
|       |   |   |-- list-add.color.svg
|       |   |   |-- weather-pouring.svg
|       |   |   `-- weather-sunset.svg
|       |   |-- ListItemsDemo.qml
|       |   |-- main.cpp
|       |   |-- main.qml
|       |   |-- PageStackDemo.qml
|       |   |-- ProgressBarDemo.qml
|       |   |-- RadioButtonDemo.qml
|       |   |-- SidebarPage.qml
|       |   |-- SliderDemo.qml
|       |   |-- SubPage.qml
|       |   |-- SwitchDemo.qml
|       |   |-- TextFieldDemo.qml
|       |   |-- TimePickerDemo.qml
|       |   `-- TypographyDemo.qml
|       |-- deploy_key.enc
|       |-- documentation
|       |   |-- images
|       |   |   `-- buttons.png
|       |   |-- material.qdoc
|       |   `-- material.qdocconf
|       |-- fonts
|       |   |-- fonts.qrc
|       |   |-- MaterialFontLoader.qml
|       |   |-- qmldir
|       |   `-- roboto
|       |       |-- Roboto-BlackItalic.ttf
|       |       |-- Roboto-Black.ttf
|       |       |-- Roboto-BoldItalic.ttf
|       |       |-- Roboto-Bold.ttf
|       |       |-- RobotoCondensed-BoldItalic.ttf
|       |       |-- RobotoCondensed-Bold.ttf
|       |       |-- RobotoCondensed-Italic.ttf
|       |       |-- RobotoCondensed-LightItalic.ttf
|       |       |-- RobotoCondensed-Light.ttf
|       |       |-- RobotoCondensed-Regular.ttf
|       |       |-- Roboto-Italic.ttf
|       |       |-- Roboto-LightItalic.ttf
|       |       |-- Roboto-Light.ttf
|       |       |-- Roboto-MediumItalic.ttf
|       |       |-- Roboto-Medium.ttf
|       |       |-- Roboto-Regular.ttf
|       |       |-- Roboto-ThinItalic.ttf
|       |       `-- Roboto-Thin.ttf
|       |-- icons
|       |   |-- core_icons.qrc
|       |   |-- navigation_arrow_back.svg
|       |   |-- navigation_chevron_left.svg
|       |   |-- navigation_chevron_right.svg
|       |   |-- navigation_close.svg
|       |   |-- navigation_menu.svg
|       |   `-- navigation_more_vert.svg
|       |-- icons.yml
|       |-- LICENSE
|       |-- LICENSE.CC-BY
|       |-- LICENSE.MPL
|       |-- material.pri
|       |-- qml-material.pro
|       |-- qpm.json
|       |-- README.md
|       |-- scripts
|       |   |-- build_docs.sh
|       |   |-- deploy.sh
|       |   |-- icons.py
|       |   |-- lint.sh
|       |   |-- make_awesome.py
|       |   |-- normalize_imports.sh
|       |   `-- qrc.py
|       |-- src
|       |   |-- components
|       |   |   |-- ActionButton.qml
|       |   |   |-- Card.qml
|       |   |   |-- components.qrc
|       |   |   |-- DatePicker.qml
|       |   |   |-- IconButton.qml
|       |   |   |-- OverlayLayer.qml
|       |   |   |-- OverlayView.qml
|       |   |   |-- ProgressCircle.qml
|       |   |   |-- Scrollbar.qml
|       |   |   |-- Snackbar.qml
|       |   |   |-- ThinDivider.qml
|       |   |   |-- TimePicker.qml
|       |   |   |-- Tooltip.qml
|       |   |   `-- Wave.qml
|       |   |-- controls
|       |   |   |-- Action.qml
|       |   |   |-- Button.qml
|       |   |   |-- CheckBox.qml
|       |   |   |-- controls.qrc
|       |   |   |-- Label.qml
|       |   |   |-- ProgressBar.qml
|       |   |   |-- RadioButton.qml
|       |   |   |-- Slider.qml
|       |   |   |-- Switch.qml
|       |   |   |-- Tab.qml
|       |   |   `-- TextField.qml
|       |   |-- core
|       |   |   |-- AwesomeIcon.qml
|       |   |   |-- awesome.js
|       |   |   |-- core.qrc
|       |   |   |-- device.cpp
|       |   |   |-- device.h
|       |   |   |-- FontAwesome.otf
|       |   |   |-- Icon.qml
|       |   |   |-- Ink.qml
|       |   |   |-- MaterialAnimation.qml
|       |   |   |-- Object.qml
|       |   |   |-- Palette.qml
|       |   |   |-- PlatformExtensions.qml
|       |   |   |-- ThemePalette.qml
|       |   |   |-- Theme.qml
|       |   |   |-- units.cpp
|       |   |   |-- units.h
|       |   |   |-- UnitsHelper.qml
|       |   |   |-- utils.js
|       |   |   `-- View.qml
|       |   |-- extras
|       |   |   |-- AutomaticGrid.qml
|       |   |   |-- CircleImage.qml
|       |   |   |-- CircleMask.qml
|       |   |   |-- ColumnFlow.qml
|       |   |   |-- extras.qrc
|       |   |   |-- Image.qml
|       |   |   `-- qmldir
|       |   |-- listitems
|       |   |   |-- BaseListItem.qml
|       |   |   |-- CMakeLists.txt
|       |   |   |-- Divider.qml
|       |   |   |-- listitems.qrc
|       |   |   |-- qmldir
|       |   |   |-- SectionHeader.qml
|       |   |   |-- SimpleMenu.qml
|       |   |   |-- Standard.qml
|       |   |   |-- Subheader.qml
|       |   |   `-- Subtitled.qml
|       |   |-- material.qrc
|       |   |-- plugin.cpp
|       |   |-- plugin.h
|       |   |-- popups
|       |   |   |-- BottomActionSheet.qml
|       |   |   |-- BottomSheet.qml
|       |   |   |-- Dialog.qml
|       |   |   |-- Dropdown.qml
|       |   |   |-- InputDialog.qml
|       |   |   |-- MenuField.qml
|       |   |   |-- Popover.qml
|       |   |   |-- PopupBase.qml
|       |   |   |-- popups.qrc
|       |   |   `-- TimePickerDialog.qml
|       |   |-- qmldir
|       |   |-- src.pro
|       |   |-- styles
|       |   |   |-- ApplicationWindowStyle.qml
|       |   |   |-- ButtonStyle.qml
|       |   |   |-- CheckBoxStyle.qml
|       |   |   |-- CMakeLists.txt
|       |   |   |-- ProgressBarStyle.qml
|       |   |   |-- qmldir
|       |   |   |-- RadioButtonStyle.qml
|       |   |   |-- SliderStyle.qml
|       |   |   |-- styles.qrc
|       |   |   |-- SwitchStyle.qml
|       |   |   |-- TextFieldStyle.qml
|       |   |   |-- ToolBarStyle.qml
|       |   |   `-- ToolButtonStyle.qml
|       |   `-- window
|       |       |-- ActionBar.qml
|       |       |-- ApplicationWindow.qml
|       |       |-- AppTheme.qml
|       |       |-- MainView.qml
|       |       |-- NavigationDrawerPage.qml
|       |       |-- NavigationDrawer.qml
|       |       |-- Page.qml
|       |       |-- PageSidebar.qml
|       |       |-- PageStack.qml
|       |       |-- Sidebar.qml
|       |       |-- TabBar.qml
|       |       |-- TabbedPage.qml
|       |       |-- Toolbar.qml
|       |       |-- Window.qml
|       |       `-- window.qrc
|       |-- styles_demo
|       |   |-- main.qml
|       |   `-- Makefile
|       |-- tests
|       |   |-- icons
|       |   |   |-- action_alarm.svg
|       |   |   |-- action_search.svg
|       |   |   |-- action_settings.svg
|       |   |   |-- content_add.svg
|       |   |   `-- icons.qrc
|       |   |-- icons.yml
|       |   |-- tests.cpp
|       |   |-- tests.pro
|       |   |-- tst_actionbar.qml
|       |   |-- tst_card.qml
|       |   `-- tst_pagestack.qml
|       `-- vendor.cmake
`-- win
|-- appicon.ico
|-- CMakeLists.txt
|-- installer.cmake.nsi
|-- installer.cmake.wxs
|-- qt.conf
`-- resources.rc

Как убрать эту ошибку из проекта?

0

Решение

Ты можешь использовать QDirIterator перепроверить, какие ресурсы содержит приложение. Например в main():

QDirIterator it(":/", QDirIterator::Subdirectories);
while (it.hasNext())
qDebug() << it.next();

Не зная, как обработка ресурсов Qt работает с CMake, я бы сказал, что следующие строки выглядят как преступник.

qt5_add_resources(RESOURCE_FILES ../resources/resources.qrc)

set(SOURCES
assets/assets.qrc
icons/icons.qrc
qml/qml.qrc)

Почему один .qrc добавлено с qt5_add_resources()тогда как остальные добавляются в SOURCES?

3

Другие решения

Других решений пока нет …

Lucas Danzinger

Hello again, I’m in the process of learning QT and building a simple ArcGIS driven app. The entire time I’ve been working on it, I periodically attempt to run my app and it gives me back something like the below in application output:

ArcGIS.Runtime.Core: void __cdecl QmlUtils::registerTypes(const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) ArcGIS.Runtime

ArcGIS.Runtime.Core: void __cdecl QmlUtils::initializeRuntimeLicense(void) Invalid clientId QVariant(QString, «39DN») status 1

ArcGIS.Runtime.Core: void __cdecl QmlUtils::initializeImageProvider(class QQmlEngine *)

ArcGIS.Runtime.Core: void __cdecl QmlUtils::initializeImageProvider(class QQmlEngine *) Setting global image provider QVariant(void*, 0x29ce2d516f0)

ArcGIS.Extras.Plugin: void __cdecl ArcGISExtrasPlugin::registerTypes(const char *) ArcGIS.Extras

ArcGIS.Extras.Plugin: void __cdecl ArcGISExtrasPlugin::registerTypes(const char *) Registering Singleton Types

ArcGIS.Extras.Core: void __cdecl TkTypes::registerTypes(const char *) ArcGIS.Extras

ArcGIS.Extras.Plugin: void __cdecl ArcGISExtrasPlugin::initializeEngine(class QQmlEngine *,const char *) ArcGIS.Extras

QQmlApplicationEngine failed to load component

C:projectsQtbuild-Test-Desktop_Qt_5_5_1_MSVC2013_64bit-DebugdebugTest.exe exited with code -1

It never gives an actual error of any useful variety, it always just says «exited with code 1», and usually that line is preceded by «QqmlApplicationEngine failed to load component». This always seems to happen in the middle of the ArcGIS initializers.

Until today, I just assumed that QT creator was terrible at detecting errors in my code, because the solution was always some mistake I’d made in regards to general QT Quick types. However, I am wondering now if it might be possible that it normally gives a real error message, and somehow ArcGIS SDK is hiding that from me?

This does not happen with any one specific error, it happens at least whenever I make a mistake with QML Types, like putting a Rectangle inside of a ListModel’s ListElement.   Because it happens and gives the exact same error for almost every mistake I ever make, I have spent countless hours manually tracking down my mistakes over the course of this project.

It’s possible I’m using the wrong kit for my system or something, but unless I make a mistake like the one mentioned above, the application compiles and runs flawlessly on my desktop as well as my phone, so I don’t really know, maybe you can help me figure it out.

The ArcGIS portion of my app runs fine when I finally figure out what QML mistake I made and fix it.

I’m running QTQuick 2.4 and ArcGIS Runtime SDK 10.2.6

I’m building for Desktop Qt 5.5.1 MSVC2013 64bit, I’m on Windows 10, 64bit.

0 / 0 / 0

Регистрация: 08.01.2016

Сообщений: 37

1

03.12.2016, 20:39. Показов 9516. Ответов 9


Для курсовой в целях

стырить и выдать за своё

ознакомления, скачал исходники программы на qt (текстовый редактор). Но при запуске выдается ошибка «Ошибка: QApplication: нет такого файла или каталога, а за ним и другие классы для работы с формой тоже не подключены.
Вопрос: как подключить эти библиотеки. Или лучше как правильно запускать приложение, которого ты не писал.
PS Свои формы создавал, и QApplication и др. прекрасно работала.

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



7275 / 6220 / 2833

Регистрация: 14.04.2014

Сообщений: 26,871

03.12.2016, 20:47

2

А для какой версии Qt эта программа? Там структура-то современная?



0



0 / 0 / 0

Регистрация: 08.01.2016

Сообщений: 37

03.12.2016, 20:52

 [ТС]

3

nmcf, ничего особо примечательного кроме чрезмерного использования указателей. Для какой версии qt писали не знаю. Но залили в 2013. Да и важно ли это? Пока ругается только на QApplication



0



7275 / 6220 / 2833

Регистрация: 14.04.2014

Сообщений: 26,871

03.12.2016, 21:01

4

Разумеется, важно. Там pro-файл может быть другой.
Что не так с QApplication? Текст ошибки где?



0



0 / 0 / 0

Регистрация: 08.01.2016

Сообщений: 37

03.12.2016, 21:22

 [ТС]

5

nmcf, ненавижу qt! Перезапустил creator и сейчас у него уже ошибка:
Ошибка при сборке/установке проекта TextEditor (комплект: Qt 5.6.1 (msvc2015_64))
Во время выполнения этапа «qmake». В проекте не могу подключить другой компилятор (ОНИ НЕ ВИДЯТСЯ)

Ок, вот:

Код

QWizard: No such file or directory
 #include <QWizard>

#include <QApplication> подсвечивает жёлтым и пишет что такого файла нет.



0



7275 / 6220 / 2833

Регистрация: 14.04.2014

Сообщений: 26,871

03.12.2016, 21:30

6

Покажи pro-файл и main().



0



Gadwil

0 / 0 / 0

Регистрация: 08.01.2016

Сообщений: 37

03.12.2016, 21:31

 [ТС]

7

nmcf,
.pro

Код

#-------------------------------------------------
#
# Project created by QtCreator 2013-10-10T16:01:30
#
#-------------------------------------------------

QT       += core gui

TARGET = TextEditor
TEMPLATE = app


SOURCES += main.cpp
        mainwindow.cpp printer.cpp texteditor.cpp wizard.cpp

HEADERS  += mainwindow.h printer.h texteditor.h wizard.h

FORMS    += mainwindow.ui

main

C++ (Qt)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char** argv) {
    QApplication app(argc, argv);
 
    QCoreApplication::setOrganizationName("MaximCorporation");
    QCoreApplication::setApplicationName("TextEditor");
 
    MainWindow window;
 
    window.show();
 
    return app.exec();
}



0



7275 / 6220 / 2833

Регистрация: 14.04.2014

Сообщений: 26,871

03.12.2016, 21:34

8



0



0 / 0 / 0

Регистрация: 08.01.2016

Сообщений: 37

03.12.2016, 21:38

 [ТС]

9

nmcf, nmcf, да, это дало результат, но он теперь что то другое не видит. Может проще скачать старый компилятор?



0



7275 / 6220 / 2833

Регистрация: 14.04.2014

Сообщений: 26,871

03.12.2016, 21:39

10

Ты очистку проекта и запуск qmake выполнили перед сборкой? Там в меню это есть.
Компилятор не при чём.



0



Понравилась статья? Поделить с друзьями:
  • Main cpp 13 1 error expected unqualified id before token
  • Make error 2 ubuntu
  • Main controller data error mavic air как починить
  • Make error 193
  • Main control system error