Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Qt Design 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 Design Viewer
Commits
04306fcd
"git@git.qt.io:tohunger/qt-creator.git" did not exist on "b68cbcc9ae0c5544f067e4b25dab4bb9b9f791d8"
Commit
04306fcd
authored
8 months ago
by
Vic Nguyen
Browse files
Options
Downloads
Patches
Plain Diff
more testing
parent
b74e9565
No related branches found
No related tags found
No related merge requests found
Pipeline
#75121
passed
8 months ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/designviewer.cpp
+13
-13
13 additions, 13 deletions
src/designviewer.cpp
with
13 additions
and
13 deletions
src/designviewer.cpp
+
13
−
13
View file @
04306fcd
...
@@ -323,10 +323,10 @@ void DesignViewer::showAppWindow()
...
@@ -323,10 +323,10 @@ void DesignViewer::showAppWindow()
qDebug
()
<<
"Setting the QML app window size"
;
qDebug
()
<<
"Setting the QML app window size"
;
if
(
size
.
isEmpty
())
{
if
(
size
.
isEmpty
())
{
qDebug
()
<<
"Setting the QML app window size to 100%"
;
qDebug
()
<<
"Setting the QML app window size to 100%"
;
qtContainerStyle
.
set
(
"width"
,
std
::
string
(
"100
%
"
));
qtContainerStyle
.
set
(
"width"
,
std
::
string
(
"100
vw
"
));
//
qtContainerStyle.set("height",
qtContainerStyle
.
set
(
"height"
,
//
std::string(
std
::
string
(
//
"100
%
")); // ### FIXME: 100% height gives 0px height for some reason
"100
vh
"
));
// ### FIXME: 100% height gives 0px height for some reason
}
else
{
}
else
{
qDebug
()
<<
"Setting the QML app window size to "
qDebug
()
<<
"Setting the QML app window size to "
+
QString
(
"%1x%2"
).
arg
(
size
.
width
()).
arg
(
size
.
height
());
+
QString
(
"%1x%2"
).
arg
(
size
.
width
()).
arg
(
size
.
height
());
...
@@ -339,15 +339,15 @@ void DesignViewer::showAppWindow()
...
@@ -339,15 +339,15 @@ void DesignViewer::showAppWindow()
// Make Qt pick up the new container size by calling the resizeCanvasElement()
// Make Qt pick up the new container size by calling the resizeCanvasElement()
// qtloader API. This needs to be done on delay after initial setup to make
// qtloader API. This needs to be done on delay after initial setup to make
// sure qtloader is initialized.
// sure qtloader is initialized.
QTimer
::
singleShot
(
0
,
[
&
]()
{
//
QTimer::singleShot(0, [&]() {
emscripten
::
val
instance
=
emscripten
::
val
::
global
(
"instance"
);
//
emscripten::val instance = emscripten::val::global("instance");
if
(
instance
.
isNull
())
{
//
if (instance.isNull()) {
qCritical
()
<<
"instance is null"
;
//
qCritical()<<"instance is null";
return
;
//
return;
}
//
}
instance
.
call
<
void
>
(
"qtResizeContainerElement"
,
qtContainer
);
//
instance.call<void>("qtResizeContainerElement", qtContainer);
qDebug
()
<<
"QML app window position set"
;
//
qDebug() << "QML app window position set";
});
//
});
qDebug
()
<<
"Showing the QML app window"
;
qDebug
()
<<
"Showing the QML app window"
;
m_quickWindow
->
show
();
m_quickWindow
->
show
();
}
}
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