Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Qt UI Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Design Studio
QML Viewer Projects
Qt UI Viewer
Commits
f7fd2266
Verified
Commit
f7fd2266
authored
1 year ago
by
Burak Hançerli
Browse files
Options
Downloads
Patches
Plain Diff
fix: ui is shown properly now
parent
3fe6ce35
No related branches found
No related tags found
No related merge requests found
Pipeline
#62178
passed
1 year ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
resources/main.qml
+54
-54
54 additions, 54 deletions
resources/main.qml
src/backend.cpp
+1
-1
1 addition, 1 deletion
src/backend.cpp
src/main.cpp
+6
-1
6 additions, 1 deletion
src/main.cpp
with
61 additions
and
56 deletions
resources/main.qml
+
54
−
54
View file @
f7fd2266
/*
/*
This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only.
This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only.
It is supposed to be strictly declarative and only uses a subset of QML. If you edit
It is supposed to be strictly declarative and only uses a subset of QML. If you edit
...
@@ -14,9 +13,8 @@ import QtQuick.Window 2.2
...
@@ -14,9 +13,8 @@ import QtQuick.Window 2.2
Rectangle
{
Rectangle
{
id
:
root
id
:
root
width
:
Screen
.
desktopAvailableWidth
width
:
400
height
:
Screen
.
desktopAvailableHeigth
height
:
800
color
:
"
#EAEAEA
"
color
:
"
#EAEAEA
"
Material.theme
:
Material
.
Light
Material.theme
:
Material
.
Light
...
@@ -25,7 +23,7 @@ Rectangle {
...
@@ -25,7 +23,7 @@ Rectangle {
ColumnLayout
{
ColumnLayout
{
id
:
bar
id
:
bar
y
:
408
y
:
50
anchors.bottom
:
column
.
top
anchors.bottom
:
column
.
top
anchors.bottomMargin
:
24
anchors.bottomMargin
:
24
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
...
@@ -39,7 +37,6 @@ Rectangle {
...
@@ -39,7 +37,6 @@ Rectangle {
ColumnLayout
{
ColumnLayout
{
id
:
column
id
:
column
y
:
549
height
:
113
height
:
113
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
...
@@ -66,41 +63,48 @@ Rectangle {
...
@@ -66,41 +63,48 @@ Rectangle {
Item
{
Item
{
id
:
header
id
:
header
width
:
351
width
:
351
height
:
309
height
:
gridLayout
.
height
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
anchors.topMargin
:
12
anchors.topMargin
:
12
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
Image
{
GridLayout
{
id
:
qdsicon
id
:
gridLayout
x
:
47
y
:
-
23
source
:
"
dvicon.png
"
fillMode
:
Image
.
PreserveAspectFit
}
ColumnLayout
{
anchors.top
:
qdsicon
.
bottom
anchors.horizontalCenterOffset
:
-
1
anchors.topMargin
:
-
20
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
Label
{
rows
:
root
.
height
>
420
?
2
:
1
id
:
label
columns
:
root
.
height
>
420
?
1
:
2
text
:
qsTr
(
"
Android Design Viewer
"
)
Layout.alignment
:
Qt
.
AlignHCenter
|
Qt
.
AlignVCenter
Image
{
id
:
qdsicon
x
:
47
y
:
-
23
width
:
204
height
:
202
source
:
"
dvicon.png
"
fillMode
:
Image
.
PreserveAspectFit
}
}
Label
{
ColumnLayout
{
id
:
label1
text
:
qsTr
(
"
Technology Preview
"
)
Layout.alignment
:
Qt
.
AlignHCenter
|
Qt
.
AlignVCenter
Layout.alignment
:
Qt
.
AlignHCenter
|
Qt
.
AlignVCenter
}
Label
{
Label
{
id
:
label2
id
:
label
text
:
backend
.
buildInfo
text
:
qsTr
(
"
Android Design Viewer
"
)
Layout.alignment
:
Qt
.
AlignHCenter
|
Qt
.
AlignVCenter
Layout.alignment
:
Qt
.
AlignHCenter
|
Qt
.
AlignVCenter
horizontalAlignment
:
"
AlignHCenter
"
}
Label
{
id
:
label1
text
:
qsTr
(
"
Technology Preview
"
)
Layout.alignment
:
Qt
.
AlignHCenter
|
Qt
.
AlignVCenter
}
Label
{
id
:
label2
text
:
backend
.
buildInfo
Layout.alignment
:
Qt
.
AlignHCenter
|
Qt
.
AlignVCenter
horizontalAlignment
:
"
AlignHCenter
"
}
}
}
}
}
}
}
...
@@ -108,43 +112,39 @@ Rectangle {
...
@@ -108,43 +112,39 @@ Rectangle {
Rectangle
{
Rectangle
{
id
:
log
id
:
log
visible
:
root
.
height
>
620
visible
:
root
.
height
>
620
color
:
"
#
ececec
"
color
:
"
#
EAEAEA
"
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.top
:
header
.
bottom
anchors.top
:
header
.
bottom
anchors.bottom
:
bar
.
top
anchors.bottom
:
bar
.
top
anchors.topMargin
:
0
anchors.topMargin
:
15
anchors.bottomMargin
:
24
anchors.bottomMargin
:
24
anchors.leftMargin
:
22
anchors.leftMargin
:
22
Label
{
id
:
label3
visible
:
false
text
:
qsTr
(
"
Log
"
)
anchors.top
:
parent
.
top
anchors.topMargin
:
12
anchors.horizontalCenter
:
parent
.
horizontalCenter
font.bold
:
true
}
ScrollView
{
ScrollView
{
id
:
scrollArea
id
:
scrollArea
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.top
:
label3
.
bot
to
m
anchors.top
:
parent
.
to
p
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
topPadding
:
13.1
clip
:
false
anchors.topMargin
:
9
anchors.rightMargin
:
2
anchors.rightMargin
:
2
TextArea
{
Item
{
id
:
logTextArea
text
:
backend
.
logs
rightInset
:
20
readOnly
:
true
clip
:
false
anchors.topMargin
:
5
placeholderText
:
qsTr
(
"
Application Logs
"
)
width
:
scrollArea
.
width
width
:
scrollArea
.
width
height
:
logTextArea
.
height
TextArea
{
y
:
20
id
:
logTextArea
text
:
backend
.
logs
rightInset
:
20
width
:
scrollArea
.
width
readOnly
:
true
anchors.topMargin
:
5
placeholderText
:
qsTr
(
"
Application Logs
"
)
}
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/backend.cpp
+
1
−
1
View file @
f7fd2266
...
@@ -57,7 +57,7 @@ Backend::Backend(QObject *parent)
...
@@ -57,7 +57,7 @@ Backend::Backend(QObject *parent)
printLog
(
"-- Screen width: "
+
QSTRN
(
screenGeometry
.
width
()));
printLog
(
"-- Screen width: "
+
QSTRN
(
screenGeometry
.
width
()));
m_buildInfo
=
QCoreApplication
::
applicationVersion
()
+
"
\n
"
+
"Qt "
+
QString
(
QT_VERSION_STR
)
m_buildInfo
=
QCoreApplication
::
applicationVersion
()
+
"
\n
"
+
"Qt "
+
QString
(
QT_VERSION_STR
)
+
"
\n
"
+
"
OpenSSL support: "
+
QVariant
(
QSslSocket
::
supportsSsl
()).
toString
();
+
"
-
OpenSSL support: "
+
QVariant
(
QSslSocket
::
supportsSsl
()).
toString
();
emit
buildInfoChanged
();
emit
buildInfoChanged
();
printLog
(
"Initialization complete"
);
printLog
(
"Initialization complete"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main.cpp
+
6
−
1
View file @
f7fd2266
...
@@ -47,7 +47,12 @@ int main(int argc, char *argv[])
...
@@ -47,7 +47,12 @@ int main(int argc, char *argv[])
QQuickView
view
;
QQuickView
view
;
view
.
engine
()
->
rootContext
()
->
setContextProperty
(
"backend"
,
&
backend
);
view
.
engine
()
->
rootContext
()
->
setContextProperty
(
"backend"
,
&
backend
);
view
.
setSource
(
QUrl
(
QStringLiteral
(
"qrc:/main.qml"
)));
view
.
setSource
(
QUrl
(
QStringLiteral
(
"qrc:/main.qml"
)));
view
.
show
();
view
.
setResizeMode
(
QQuickView
::
SizeRootObjectToView
);
view
.
showMaximized
();
QThread
::
msleep
(
2000
);
// backend.downloadAndRun("https://designviewer.qt.io/#17e8907b3b84b8206d45be4f551f4e25/"
// "MaterialBundle.qmlrc");
return
app
.
exec
();
return
app
.
exec
();
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment