Closed MichaelHeiser closed 2 years ago
Hello you should simply use cmake, I don't know qmake. I have no idea from where the crash might come.
Hello same behaviour.
Here parts of my cmake. Luckily I'm currently working on moving my prject from qmake 2 cmake.
if(MSVC)
include_directories(D:/Projects/Qt/Qaterial/install/win/${CMAKE_BUILD_TYPE}/include)
target_link_directories(${QATERIALGALLERY_TARGET} PRIVATE D:/Projects/Qt/Qaterial/install/win/${CMAKE_BUILD_TYPE}/lib)
set(QML_IMPORT_PATH D:/Projects/Qt/Qaterial/qml/Qaterial D:/Projects/Qt/Qaterial/install/win/${CMAKE_BUILD_TYPE}/lib CACHE STRING "" FORCE)
endif()
target_link_libraries(EuroSoft_live PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/../../applets/measurement/measurement.lib
${CMAKE_CURRENT_BINARY_DIR}/../../applets/settings/settings.lib
${CMAKE_CURRENT_BINARY_DIR}/../../libraries/EuroSoft/EuroSoft.lib
${CMAKE_CURRENT_BINARY_DIR}/../../libraries/EuroSoftUi/EuroSoftUi.lib
${CMAKE_CURRENT_BINARY_DIR}/../../libraries/3rdparty/QCustomPlot/QCustomPlot.lib
${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/3rdparty/QuickDownload/lib/win/QuickDownload${LIB_SUFFIX}.lib
${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/3rdparty/SCodes/lib/win/SCodes${LIB_SUFFIX}.lib
${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/3rdparty/S6600RemoteDisplay/lib/win/S6600RemoteDisplay${LIB_SUFFIX}.lib
${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/3rdparty/ncreport/lib/win/NCReport${LIB_SUFFIX}2.lib
${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/3rdparty/ncreport/lib/win/NCReportZint${LIB_SUFFIX}2.lib
Qt::PrintSupport
Qt::WebChannel
SetupAPI
hid
user32
opengl32.lib
Qaterial
QaterialIcons
QaterialFonts
QaterialComponents
QOlm
)
When i don' add import path "qrc:///" I get following error:
qaterial.utils: Load font ":/Qaterial/Fonts/Roboto/Roboto-Medium.ttf"
qaterial.utils: Load font ":/Qaterial/Fonts/Roboto/Roboto-Regular.ttf"
qaterial.utils: Load font ":/Qaterial/Fonts/RobotoMono/RobotoMono-Regular.ttf"
QQmlApplicationEngine failed to load component
qrc:/EuroSoftLiveViewQml_win.qml:30:1: Type Framework.EsApplication unavailable
qrc:/ui/framework/EsApplication.qml:25:1: Type Controls.ApplicationWindow unavailable
qrc:/Qaterial/ApplicationWindow.qml:45:3: Qaterial.DialogLoader is not a type
WARNING: No translated disclaimer found. Using english disclaimer instead.
My application makes heavy usage of quickcontrols, could it be that loading qaterial "overwrites" quickcontrols object?
Regards Michael
Thank you very much!! This did the trick!!
m_engine->addImportPath("qrc:///");
qaterial::loadQmlResources(false);
qaterial::registerQmlTypes();
With this init without setting the style my app starts up.
Hey,
I want to use Qaterial as main UI components in my applications. The application currently relies on a Universal styled custom control set. I managed to build Qaterial for Qt 5.15 and I also can build my application against it. App launches, but app crashes after loading my main qml file. I built qaterial on local hard drive and want to include the lib in my qmake base project.
Here my project file:
Load main file, in main file i did not import Qaterial.
m_qmlEngine.load(QUrl(QStringLiteral("qrc:/EuroSoftLiveViewQml_win.qml")));
Init qaterial:
Starting app:
Crash of app:
I've been able to use locally built Qaterial with QaterialGallery and HelloWorldExample, these applications start fine. So my idea is that my config in qtquickcontrolsconfig2.conf could be the reason?
Can anyone help me?