diff --git a/CMakeLists.txt b/CMakeLists.txt index bfe5ad3..05c0ca0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16) project(AutoCatQt VERSION 0.1 LANGUAGES CXX) 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(nlohmann_json REQUIRED) @@ -30,6 +30,7 @@ set_target_properties(appAutoCatQt PROPERTIES target_link_libraries(appAutoCatQt PRIVATE Qt6::Quick + PRIVATE Qt6::QuickControls2 PRIVATE nlohmann_json::nlohmann_json ) diff --git a/main.cpp b/main.cpp index ec756a4..8f07ee6 100644 --- a/main.cpp +++ b/main.cpp @@ -3,11 +3,13 @@ #include #include #include +#include int main(int argc, char *argv[]) { - QQuickWindow::setGraphicsApi(QSGRendererInterface::Software); + //QQuickWindow::setGraphicsApi(QSGRendererInterface::Software); QGuiApplication app(argc, argv); + //QQuickStyle::setStyle("Fusion"); QQmlApplicationEngine engine; QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed, diff --git a/views/LoginWindow.qml b/views/LoginWindow.qml index a7ed59a..67eed08 100644 --- a/views/LoginWindow.qml +++ b/views/LoginWindow.qml @@ -9,21 +9,23 @@ Window { visible: true width: 640 + color: active + ColumnLayout { anchors.centerIn: parent spacing: 16 width: parent.width * 0.6 - // TextField { - // id: login - // anchors.left: parent.left - // anchors.right: parent.right - // } - // TextField { - // id: password - // anchors.left: parent.left - // anchors.right: parent.right - // } + TextField { + id: login + Layout.fillWidth: true + } + + TextField { + id: password + Layout.fillWidth: true + echoMode: TextInput.Password + } Button { Layout.fillWidth: true diff --git a/views/TextField.qml b/views/TextField.qml index 94c483e..976584b 100644 --- a/views/TextField.qml +++ b/views/TextField.qml @@ -1,20 +1,21 @@ import QtQuick -import QtQuick FocusScope { property alias input: input property alias text: input.text + property alias passwordCharacter: input.passwordCharacter + property alias echoMode: input.echoMode height: input.contentHeight + 8 Rectangle { anchors.fill: parent - border.color: "gray" - color: "lightsteelblue" + //border.color: "gray" + //color: "lightsteelblue" } + TextInput { id: input - anchors.fill: parent anchors.margins: 4 focus: true