Skip to content

Commit

Permalink
啥也没写
Browse files Browse the repository at this point in the history
  • Loading branch information
Fydui committed Jan 12, 2017
0 parents commit 7a0b221
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 0 deletions.
Binary file added Data/imge/BG_sea.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Data/imge/shore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions GWindow.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import QtQuick 2.0

Item {

}
29 changes: 29 additions & 0 deletions Game.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
QT += qml quick

CONFIG += c++11

SOURCES += main.cpp

RESOURCES += qml.qrc

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
14 changes: 14 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>

int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);


QQmlApplicationEngine engine;
engine.load(QUrl(QLatin1String("qrc:/main.qml")));

return app.exec();
}
25 changes: 25 additions & 0 deletions main.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0

ApplicationWindow {
visible: true
width: 960
height: 540
title: qsTr("Game");
maximumHeight: 540;
maximumWidth: 960;
minimumHeight: 540;
minimumWidth: 960;

Image {
id: bg_sea
source: "///Data/imge/BG_sea.png"
}

Image {
id: shore
source: "///Data/imge/shore.png"
}
}

8 changes: 8 additions & 0 deletions qml.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>GWindow.qml</file>
<file>Data/imge/BG_sea.png</file>
<file>Data/imge/shore.png</file>
</qresource>
</RCC>

0 comments on commit 7a0b221

Please sign in to comment.