Latest changes

This commit is contained in:
Selim Mustafaev 2023-07-04 01:02:03 +03:00
parent 092f4ea2b5
commit 5fc8b08ddc
4 changed files with 22 additions and 16 deletions

View File

@ -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
)

View File

@ -3,11 +3,13 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickWindow>
#include <QQuickStyle>
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,

View File

@ -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

View File

@ -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