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)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
|
||||
4
main.cpp
4
main.cpp
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user