Skip to content
Snippets Groups Projects
Commit 04306fcd authored by Vic Nguyen's avatar Vic Nguyen :ghost:
Browse files

more testing

parent b74e9565
No related branches found
No related tags found
No related merge requests found
Pipeline #75121 passed
......@@ -323,10 +323,10 @@ void DesignViewer::showAppWindow()
qDebug() << "Setting the QML app window size";
if (size.isEmpty()) {
qDebug() << "Setting the QML app window size to 100%";
qtContainerStyle.set("width", std::string("100%"));
// qtContainerStyle.set("height",
// std::string(
// "100%")); // ### FIXME: 100% height gives 0px height for some reason
qtContainerStyle.set("width", std::string("100vw"));
qtContainerStyle.set("height",
std::string(
"100vh")); // ### FIXME: 100% height gives 0px height for some reason
} else {
qDebug() << "Setting the QML app window size to "
+ QString("%1x%2").arg(size.width()).arg(size.height());
......@@ -339,15 +339,15 @@ void DesignViewer::showAppWindow()
// 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
// sure qtloader is initialized.
QTimer::singleShot(0, [&]() {
emscripten::val instance = emscripten::val::global("instance");
if (instance.isNull()) {
qCritical()<<"instance is null";
return;
}
instance.call<void>("qtResizeContainerElement", qtContainer);
qDebug() << "QML app window position set";
});
// QTimer::singleShot(0, [&]() {
// emscripten::val instance = emscripten::val::global("instance");
// if (instance.isNull()) {
// qCritical()<<"instance is null";
// return;
// }
// instance.call<void>("qtResizeContainerElement", qtContainer);
// qDebug() << "QML app window position set";
// });
qDebug() << "Showing the QML app window";
m_quickWindow->show();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment