AWS Glue: how to cast array using resolveChoice()? - amazon-web-services

I have a schema in AWS Glue job.
|-- individual_lender_probs: array
| |-- element: struct
| | |-- lender: string
| | |-- buy_rate: double
| | |-- approve_prob: double
How can I create a schema for this using resolveChoice()? It should be like df=df.resolveChoice(specs = [('individual_lender_probs','cast:XXXX')])

Related

Dynamodb single table structure for Many to many relation

We have two Entity Categories and Users. It is classic many 2 many relations.
Users can be tagged to multiple category
Category can have multiple users
Access patterns
Get list of categories
Get list of users, with categories users belong to
Get single user, with categories single user belong to
Get List of users in specific category
I tried to model using Adjacency pattern
but I have few confusions on how to query for
Users list and also get all categories each users belong to
If you have a PK containing the Category and an SK containing the User to model the users in each category, you can create a Global Secondary Index (GSI) with the PK pointing to the original table‘s SK (User) and the SK pointing to the original table’s PK (Category).
Table
| PK | SK | ...
| C#1 | U#1 | ...
| C#1 | U#2 | ...
| C#2 | U#1 | ...
| C#2 | U#3 | ...
GSI
| Table_SK | Table_PK | ...
| U#1 | C#1 | ...
| U#1 | C#2 | ...
| U#2 | C#1 | ...
| U#3 | C#2 | ...
Now you can query:
All categories including their respective users (scan Table)
All users in a single category (query Table)
All users including their respective categories (scan GSI)
All categories that a single user belongs to (query GSI)
Update: Extended model to include metadata as per comments
Table
| PK | SK | CAT | USR | Metadata
---------------------------------------
| | DATA | | { ...: ... }
| C#1 | U#1 | C#1 | U#1 | { ...: ... } (copied from user record)
| | U#2 | C#1 | U#1 | { ...: ... } (copied from user record)
---------------------------------------
| | DATA | | { ...: ... }
| C#2 | U#1 | C#1 | U#1 | { ...: ... } (copied from user record)
| | U#3 | C#1 | U#1 | { ...: ... } (copied from user record)
---------------------------------------
| U#1 | DATA | | { ...: ... }
---------------------------------------
| U#2 | DATA | | { ...: ... }
---------------------------------------
| U#3 | DATA | | { ...: ... }
---------------------------------------
GSI_Users
| Table_USR | Table_CAT |
-----------------------
| U#1 | C#1 |
| | C#2 |
-----------------------
| U#2 | C#1 |
-----------------------
| U#3 | C#2 |
-----------------------
GSI_Categories
| Table_CAT | Table_USR |
-----------------------
| C#1 | U#1 |
| | U#2 |
-----------------------
| C#2 | U#1 |
| | U#3 |
-----------------------
Queries:
All Categories (incl their Users): Scan GSI_Categories
All Users (including their Categories): Scan GSI_Users
Specific Category (including metadata): Query Table by C#x and SK=DATA
Specific Category and its Users: Query GSI_Categories by C#x
Specific User (including metadata): Query Table by U#x and SK=DATA
Sepcific User and its Categories: Query GSI_Users by U#x

Parse json to DynamicFrame columns

Hello I am trying to parse json file in following structure to DynamicFrame colums.I need every column separetely
changedFields|First Name|Last Name| ...... | id
| | | |
| | | |
|-- employees: array
| |-- element: struct
| | |-- changedFields: array
| | | |-- element: choice
| | | | |-- int
| | | | |-- string
| | |-- fields: struct
| | | |-- First Name: string
| | | |-- Last Name: string
| | | |-- Status: string
| | | |-- Employee #: string
| | | |-- Marital Status: string
| | | |-- Address Line 1: string
| | | |-- Mobile Phone: string
| | | |-- Work Email: string
| | | |-- Hire Date: string
| | | |-- Original Hire Date: string
| | | |-- Effective Date: string
| | | |-- Location: string
| | | |-- Division: string
| | | |-- Department: string
| | | |-- Job Title: string
| | | |-- Reports To: string
| | |-- id: string
df=spark.read.format("json").option("inferSchema","true").load("test.json").select(F.explode("employees").alias('employees')).select('employees.*').select("element.*")
df2 = df.select(df.select(F.explode("fields").alias("fields").select("fields.*"), df.select("fields.*"), df.id.alias("id"))
df.show()

In AWS Glue, how do I apply resolveChoice to a struct element within an array in a DynamicFrame?

How do I apply resolveChoice to a struct element within an array inside a DynamicFrame?
DynamicFrame Schema for reference
|-- ColumnA: string
|-- ColumnB: array
| |-- element: struct
| | |-- ColumnC: string
| | |-- ColumnD: choice
| | | |-- double
| | | |-- int
I want to apply resolveChoice to Column D. This would usually be resolved by below line if ColumnD was at root level.
df = df.resolveChoice(specs = [('ColumnD', 'cast:double')])
But how do I do the same within an array of struct?
This can be achieved with below code snippet
df = df.resolveChoice(specs = [("ColumnB[].ColumnD", "cast:double")])

Physx - linking problem with come functions (__imp_PxCreateBasePhysics referenced in function...)

I'm trying to implement PhysX into my game engine, but I have got some weird problems with linking the PhysX library. It always fails no matter what I do, but snippets from Nvidia works like a charm. I will try to describe what I did and I hope someone will find what I'm missing.
First of all, I downloaded PhysX 4.1 from Github. Then I changed buildtools settings to those:
<?xml version="1.0" encoding="utf-8"?>
<preset name="vc15win64" comment="VC15 Win64 PhysX general settings">
<platform targetPlatform="win64" compiler="vc15" />
<CMakeSwitches>
<cmakeSwitch name="PX_BUILDSNIPPETS" value="True" comment="Generate the snippets" />
<cmakeSwitch name="PX_BUILDPUBLICSAMPLES" value="True" comment="Generate the samples projects" />
<cmakeSwitch name="PX_GENERATE_STATIC_LIBRARIES" value="True" comment="Generate static libraries" />
<cmakeSwitch name="NV_USE_STATIC_WINCRT" value="False" comment="Use the statically linked windows CRT" />
<cmakeSwitch name="NV_USE_DEBUG_WINCRT" value="True" comment="Use the debug version of the CRT" />
<cmakeSwitch name="PX_FLOAT_POINT_PRECISE_MATH" value="True" comment="Float point precise math" />
</CMakeSwitches>
<CMakeParams>
<cmakeParam name="CMAKE_INSTALL_PREFIX" value="install/vc15win64/PhysX" comment="Install path relative to PhysX SDK root" />
</CMakeParams>
</preset>
Then I used bat script to generate Visual Studio 2017 project for static linking and for runtime static libraries. Then I compiled the project in debug and release version. SnippestHelloWorld works without any problems. So far so good. So I created new project in Visual Studio 2017 and I selected x64 processor architecture (like in PhysX xml configuration). Then I included header files the same way as in SnippestHelloWorld. Here is a tree:
| PxActor.h
| PxAggregate.h
| PxArticulation.h
| PxArticulationBase.h
| PxArticulationJoint.h
| PxArticulationJointReducedCoordinate.h
| PxArticulationLink.h
| PxArticulationReducedCoordinate.h
| PxBatchQuery.h
| PxBatchQueryDesc.h
| PxBroadPhase.h
| PxClient.h
| PxConfig.h
| PxConstraint.h
| PxConstraintDesc.h
| PxContact.h
| PxContactModifyCallback.h
| PxDeletionListener.h
| PxFiltering.h
| PxForceMode.h
| PxFoundation.h
| PxImmediateMode.h
| PxLockedData.h
| PxMaterial.h
| PxPhysics.h
| PxPhysicsAPI.h
| PxPhysicsSerialization.h
| PxPhysicsVersion.h
| PxPhysXConfig.h
| PxPruningStructure.h
| PxQueryFiltering.h
| PxQueryReport.h
| PxRigidActor.h
| PxRigidBody.h
| PxRigidDynamic.h
| PxRigidStatic.h
| PxScene.h
| PxSceneDesc.h
| PxSceneLock.h
| PxShape.h
| PxSimulationEventCallback.h
| PxSimulationStatistics.h
| PxVisualizationParameter.h
| stack.txt
|
+---characterkinematic
| PxBoxController.h
| PxCapsuleController.h
| PxController.h
| PxControllerBehavior.h
| PxControllerManager.h
| PxControllerObstacles.h
| PxExtended.h
|
+---collision
| PxCollisionDefs.h
|
+---common
| | PxBase.h
| | PxCollection.h
| | PxCoreUtilityTypes.h
| | PxMetaData.h
| | PxMetaDataFlags.h
| | PxPhysicsInsertionCallback.h
| | PxPhysXCommonConfig.h
| | PxProfileZone.h
| | PxRenderBuffer.h
| | PxSerialFramework.h
| | PxSerializer.h
| | PxStringTable.h
| | PxTolerancesScale.h
| | PxTypeInfo.h
| |
| \---windows
| PxWindowsDelayLoadHook.h
|
+---cooking
| PxBVH33MidphaseDesc.h
| PxBVH34MidphaseDesc.h
| PxBVHStructureDesc.h
| Pxc.h
| PxConvexMeshDesc.h
| PxCooking.h
| PxMidphaseDesc.h
| PxTriangleMeshDesc.h
|
+---cudamanager
| PxCudaContextManager.h
| PxCudaMemoryManager.h
|
+---extensions
| PxBinaryConverter.h
| PxBroadPhaseExt.h
| PxCollectionExt.h
| PxConstraintExt.h
| PxContactJoint.h
| PxConvexMeshExt.h
| PxD6Joint.h
| PxD6JointCreate.h
| PxDefaultAllocator.h
| PxDefaultCpuDispatcher.h
| PxDefaultErrorCallback.h
| PxDefaultSimulationFilterShader.h
| PxDefaultStreams.h
| PxDistanceJoint.h
| PxExtensionsAPI.h
| PxFixedJoint.h
| PxJoint.h
| PxJointLimit.h
| PxMassProperties.h
| PxPrismaticJoint.h
| PxRaycastCCD.h
| PxRepXSerializer.h
| PxRepXSimpleType.h
| PxRevoluteJoint.h
| PxRigidActorExt.h
| PxRigidBodyExt.h
| PxSceneQueryExt.h
| PxSerialization.h
| PxShapeExt.h
| PxSimpleFactory.h
| PxSmoothNormals.h
| PxSphericalJoint.h
| PxStringTableExt.h
| PxTriangleMeshExt.h
|
+---filebuf
| PxFileBuf.h
|
+---foundation
| | Px.h
| | PxAllocatorCallback.h
| | PxAssert.h
| | PxBitAndData.h
| | PxBounds3.h
| | PxErrorCallback.h
| | PxErrors.h
| | PxFlags.h
| | PxFoundationConfig.h
| | PxIntrinsics.h
| | PxIO.h
| | PxMat33.h
| | PxMat44.h
| | PxMath.h
| | PxMathUtils.h
| | PxMemory.h
| | PxPlane.h
| | PxPreprocessor.h
| | PxProfiler.h
| | PxQuat.h
| | PxSharedAssert.h
| | PxSimpleTypes.h
| | PxStrideIterator.h
| | PxTransform.h
| | PxUnionCast.h
| | PxVec2.h
| | PxVec3.h
| | PxVec4.h
| |
| +---unix
| | PxUnixIntrinsics.h
| |
| \---windows
| PxWindowsIntrinsics.h
|
+---geometry
| PxBoxGeometry.h
| PxBVHStructure.h
| PxCapsuleGeometry.h
| PxConvexMesh.h
| PxConvexMeshGeometry.h
| PxGeometry.h
| PxGeometryHelpers.h
| PxGeometryQuery.h
| PxHeightField.h
| PxHeightFieldDesc.h
| PxHeightFieldFlag.h
| PxHeightFieldGeometry.h
| PxHeightFieldSample.h
| PxMeshQuery.h
| PxMeshScale.h
| PxPlaneGeometry.h
| PxSimpleTriangleMesh.h
| PxSphereGeometry.h
| PxTriangle.h
| PxTriangleMesh.h
| PxTriangleMeshGeometry.h
|
+---geomutils
| GuContactBuffer.h
| GuContactPoint.h
|
+---gpu
| PxGpu.h
|
+---pvd
| PxPvd.h
| PxPvdSceneClient.h
| PxPvdTransport.h
|
+---solver
| PxSolverDefs.h
|
+---task
| PxCpuDispatcher.h
| PxTask.h
| PxTaskDefine.h
| PxTaskManager.h
|
\---vehicle
PxVehicleComponents.h
PxVehicleDrive.h
PxVehicleDrive4W.h
PxVehicleDriveNW.h
PxVehicleDriveTank.h
PxVehicleNoDrive.h
PxVehicleSDK.h
PxVehicleShaders.h
PxVehicleTireFriction.h
PxVehicleUpdate.h
PxVehicleUtil.h
PxVehicleUtilControl.h
PxVehicleUtilSetup.h
PxVehicleUtilTelemetry.h
PxVehicleWheels.h
I think those are all required header files. Then I added this list of lib files for linked (even some of them are unnecessary in my opinion):
PhysX_static_64.lib
PhysXPvdSDK_static_64.lib
PhysXVehicle_static_64.lib
PhysXCharacterKinematic_static_64.lib
CPhysXExtensions_static_64.lib
PhysXCooking_static_64.lib
PhysXCommon_static_64.lib
PhysXFoundation_static_64.lib
SnippetUtils_static_64.lib
SnippetRender_static_64.lib
And then I created a really simple C++ code to test if it works:
#include "PxPhysicsAPI.h"
int main()
{
auto Allocator = physx::PxDefaultAllocator();
auto ErrorCallback = physx::PxDefaultErrorCallback();
auto Foundation = PxCreateFoundation(PX_PHYSICS_VERSION, Allocator, ErrorCallback);
auto PhysXVisualDebugger = PxCreatePvd(*Foundation);
const auto transport = physx::PxDefaultPvdSocketTransportCreate("127.0.0.1", 5425, 10);
PhysXVisualDebugger->connect(*transport, physx::PxPvdInstrumentationFlag::eALL);
auto Physics = PxCreatePhysics(PX_PHYSICS_VERSION, *Foundation, physx::PxTolerancesScale(), true, PhysXVisualDebugger);
physx::PxSceneDesc sceneDesc(Physics->getTolerancesScale());
sceneDesc.gravity = physx::PxVec3(0.0f, -9.81f, 0.0f);
auto Dispatcher = physx::PxDefaultCpuDispatcherCreate(2);
sceneDesc.cpuDispatcher = Dispatcher;
sceneDesc.filterShader = physx::PxDefaultSimulationFilterShader;
auto Scene = Physics->createScene(sceneDesc);
auto pvdClient = Scene->getScenePvdClient();;
pvdClient->setScenePvdFlag(physx::PxPvdSceneFlag::eTRANSMIT_CONSTRAINTS, true);
pvdClient->setScenePvdFlag(physx::PxPvdSceneFlag::eTRANSMIT_CONTACTS, true);
pvdClient->setScenePvdFlag(physx::PxPvdSceneFlag::eTRANSMIT_SCENEQUERIES, true);
}
And... It just doesn't work. I always get this error from linker when I try to compile my simple project:
It might sound funny, but I tried almost everything. I event know which line couses this error, becuase if I remove calling PxCreatePhysics it compiles without any problems. Only this one line has got some weird problem with linking and I do not understand it.
What should I try to resolve this? I do not even know where to look for an answer. I have got compiled PhysX library compiled for correct CPU Architecture and for correct Runtime libraries, with the same sompiler and with the same machine, why examples by Nvidia works and my code doesn't?
I found the answer to my question. You need to add this preprocessor definition:
PX_PHYSX_STATIC_LIB
Or you can include PxConfig.h header file before other imports, but I wouldn't recommend this method, because IDE will be informing you all the time, that this import is unnecessary (which is not true at all).

Can't load qml file in cmake based qt project [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I am working on a Qt Project that's based on cmake. The Qt version is 5.7, Ubuntu 14.04. The error I am getting is:
QQmlApplicationEngine failed to load component
qrc:/main.qml:-1 File not found
The CMakeLists.txt is:
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()
The tree output of project is:
.
|-- 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
How do I remove this error from the project?
You can use QDirIterator to double check what resources the application contains. For example in main():
QDirIterator it(":/", QDirIterator::Subdirectories);
while (it.hasNext())
qDebug() << it.next();
Without knowing how Qt resource handling works with CMake, I'd say the following lines look like the culprit.
qt5_add_resources(RESOURCE_FILES ../resources/resources.qrc)
set(SOURCES
assets/assets.qrc
icons/icons.qrc
qml/qml.qrc)
Why is one .qrc added with qt5_add_resources(), whereas the others are added to SOURCES?