Latest changes
This commit is contained in:
parent
092f4ea2b5
commit
5fc8b08ddc
@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
project(AutoCatQt VERSION 0.1 LANGUAGES CXX)
|
project(AutoCatQt VERSION 0.1 LANGUAGES CXX)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_PREFIX_PATH "/home/selim/qt/6.4.3/gcc_64/lib/cmake")
|
set(CMAKE_PREFIX_PATH "/home/selim/qt/6.5.1/gcc_64/lib/cmake")
|
||||||
|
|
||||||
find_package(Qt6 6.4 REQUIRED COMPONENTS Quick QuickControls2)
|
find_package(Qt6 6.4 REQUIRED COMPONENTS Quick QuickControls2)
|
||||||
find_package(nlohmann_json REQUIRED)
|
find_package(nlohmann_json REQUIRED)
|
||||||
@ -30,6 +30,7 @@ set_target_properties(appAutoCatQt PROPERTIES
|
|||||||
|
|
||||||
target_link_libraries(appAutoCatQt
|
target_link_libraries(appAutoCatQt
|
||||||
PRIVATE Qt6::Quick
|
PRIVATE Qt6::Quick
|
||||||
|
PRIVATE Qt6::QuickControls2
|
||||||
PRIVATE nlohmann_json::nlohmann_json
|
PRIVATE nlohmann_json::nlohmann_json
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
4
main.cpp
4
main.cpp
@ -3,11 +3,13 @@
|
|||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
#include <QQuickWindow>
|
#include <QQuickWindow>
|
||||||
|
#include <QQuickStyle>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QQuickWindow::setGraphicsApi(QSGRendererInterface::Software);
|
//QQuickWindow::setGraphicsApi(QSGRendererInterface::Software);
|
||||||
QGuiApplication app(argc, argv);
|
QGuiApplication app(argc, argv);
|
||||||
|
//QQuickStyle::setStyle("Fusion");
|
||||||
|
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed,
|
QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed,
|
||||||
|
|||||||
@ -9,21 +9,23 @@ Window {
|
|||||||
visible: true
|
visible: true
|
||||||
width: 640
|
width: 640
|
||||||
|
|
||||||
|
color: active
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: 16
|
spacing: 16
|
||||||
width: parent.width * 0.6
|
width: parent.width * 0.6
|
||||||
|
|
||||||
// TextField {
|
TextField {
|
||||||
// id: login
|
id: login
|
||||||
// anchors.left: parent.left
|
Layout.fillWidth: true
|
||||||
// anchors.right: parent.right
|
}
|
||||||
// }
|
|
||||||
// TextField {
|
TextField {
|
||||||
// id: password
|
id: password
|
||||||
// anchors.left: parent.left
|
Layout.fillWidth: true
|
||||||
// anchors.right: parent.right
|
echoMode: TextInput.Password
|
||||||
// }
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@ -1,20 +1,21 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick
|
|
||||||
|
|
||||||
FocusScope {
|
FocusScope {
|
||||||
property alias input: input
|
property alias input: input
|
||||||
property alias text: input.text
|
property alias text: input.text
|
||||||
|
property alias passwordCharacter: input.passwordCharacter
|
||||||
|
property alias echoMode: input.echoMode
|
||||||
|
|
||||||
height: input.contentHeight + 8
|
height: input.contentHeight + 8
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
border.color: "gray"
|
//border.color: "gray"
|
||||||
color: "lightsteelblue"
|
//color: "lightsteelblue"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextInput {
|
TextInput {
|
||||||
id: input
|
id: input
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 4
|
anchors.margins: 4
|
||||||
focus: true
|
focus: true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user