Browse Source

Switched from QGuiapplication to QApplication

Signed-off-by: Blagovest Petrov <blagovest@petrovs.info>
pull/1/head
Blagovest Petrov 4 years ago
parent
commit
b2db258fd6
  1. 4
      CMakeLists.txt
  2. 2
      TangraPlay.pro
  3. 3
      main.cpp

4
CMakeLists.txt

@ -13,7 +13,7 @@ list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Quick QuickControls2 Multimedia )
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Quick QuickControls2 Multimedia Widgets Gui )
include_directories(.)
include_directories(${Qt5Core_PRIVATE_INCLUDE_DIRS})
@ -48,6 +48,8 @@ target_link_libraries(tangraplay
Qt5::Quick
Qt5::QuickControls2
Qt5::Core
Qt5::Widgets
Qt5::Gui
Qt5::Multimedia )
install(TARGETS tangraplay DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})

2
TangraPlay.pro

@ -1,4 +1,4 @@
QT += quick
QT += quick gui core widgets
CONFIG += c++11

3
main.cpp

@ -1,11 +1,12 @@
#include <QGuiApplication>
#include <QApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QApplication app(argc, argv);
QQmlApplicationEngine engine;
const QUrl url(QStringLiteral("qrc:/main.qml"));

Loading…
Cancel
Save