mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 10:43:45 +02:00
working on windows cmake version
This commit is contained in:
parent
06d3bb2a34
commit
0a2b546017
2 changed files with 25 additions and 6 deletions
|
@ -20,7 +20,7 @@ endforeach()
|
||||||
set(src_files
|
set(src_files
|
||||||
src/main.cpp)
|
src/main.cpp)
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${src_file})
|
add_executable(${PROJECT_NAME} ${src_files})
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC
|
target_link_libraries(${PROJECT_NAME} PUBLIC
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
|
|
|
@ -1,7 +1,26 @@
|
||||||
//main.cpp
|
#include <iostream>
|
||||||
//#include <iostream>
|
#include <QGuiApplication>
|
||||||
|
#include <QQuickView>
|
||||||
|
#include <QString>
|
||||||
|
#include <QtPlugin>
|
||||||
|
/*Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
|
||||||
|
Q_IMPORT_PLUGIN(QtQuick2Plugin);
|
||||||
|
Q_IMPORT_PLUGIN(QtQuickControls2Plugin);
|
||||||
|
Q_IMPORT_PLUGIN(QtQuickTemplates2Plugin);*/
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QString name { "QtExamples" };
|
||||||
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
|
QCoreApplication::setOrganizationName(name);
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
QGuiApplication app(argc, argv);
|
||||||
//std::cout << "Hello World \n";
|
|
||||||
return 0;
|
QQuickView view;
|
||||||
|
view.setFlags(Qt::FramelessWindowHint);
|
||||||
|
view.setSource(QUrl("/Users/danteruiz/github/test/qml/root.qml"));
|
||||||
|
if (view.status() == QQuickView::Error)
|
||||||
|
return -1;
|
||||||
|
view.setResizeMode(QQuickView::SizeRootObjectToView);
|
||||||
|
view.show();
|
||||||
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue