Qml contents doesn't appear under Windows
-
Hello,
QML contents doesn't appear under Windows for a fresh project, that was generated by QtCreator.
Here is what I did :
- l have generated a project using QtCreator => New project... => Application (Qt Quick) => Qt Quick Application - Scroll => using CMake as the build system
- Using QtCreator I have built the app in Release build configuration.
- I have moved the built *.exe to a freshly created, empty folder.
- I called
C:/Qt/5.12.2/msvc2017_64/bin/windeployqt.exe QtCreatorScrollProject.exe --release --qmldir=c:\Users\<myUserName>\Documents\QtCreatorScrollProject
to deploy the Qt dependencies next to the project.
When I run this build on my development machine, it works fine :
When I try to run the exact same app on a fresh virtual machine, the window appears, but the QML contents inside of the window are not visible ( == the scrollable list doesn't appear ) :
I guessed that it is a deployment issue, so I tried to follow this guide : https://wiki.qt.io/Deploy_an_Application_on_Windows . I followed these steps :
"
Copy the following into C:\Deployment
The release version of MyApp.exe
All the .dll files from C:\Qt\5.2.1\mingw48_32\bin
All the folders from C:\Qt\5.2.1\mingw48_32\plugins
(If you used QML) All the folders from C:\Qt\5.2.1\mingw48_32\qml
"
which I actually had to translate to these steps for myself :
"
Copy the following into C:\Deployment
The release version of QtCreatorScrollProject.exe
All the .dll files from C:\Qt\5.12.2\msvc2017_64\bin
All the folders from C:\Qt\5.12.2\msvc2017_64\plugins
(If you used QML) All the folders from C:\Qt\5.12.2\msvc2017_64\qml
"
But even after having done this, the app doesn't show the QML contents.What could I do to fix this issue?
Thank you for your help in advance!
-
OK : I got the fix : it is a rendering issue.
When I force rendering via ANGLE, it works : Options for forcing rendering via ANGLE :
1.: setting theQT_OPENGL
environment variable toangle
. (I only tested this solution, and it works well.)
2.: compile Qt withconfigure ... -angle
.
3.: callQCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
before creating theQApplication
object .There is still an interesting thing : based on Qt's documentation, Qt libraries are compiled with
-opengl dynamic
which means that Qt should fallback to using the ANGLE renderer by itself (without me having to forcefully ask it to do that).
Ref.: https://doc.qt.io/qt-5/windows-requirements.html#graphics-drivers
Ref2.: https://doc.qt.io/qt-5/configure-options.html#opengl-options-for-windowsSo it seems like that this fallback mechanism is broken.
( A bit more info about the different renderers : https://wiki.qt.io/Qt_5_on_Windows_ANGLE_and_OpenGL )
-
@just_a_developer do you have your qml files inside your
qrc
resources ? Or do you load them from the filesystem -
@J-Hilk :
QtCreator generates a project which has QML in qrc resources :
-
your argument for windeployqt seems to be wrong
you have
--qmldir=c:\Users<myUserName>\Documents\QtCreatorScrollProjectand it probably should be
--qmldir c:\Users<myUserName>\Documents\QtCreatorScrollProject -
@J-Hilk
I just tried with :
--qmldir c:\Users<myUserName>\Documents\QtCreatorScrollProject, and I got the same results : QML contents still don't appear.
Just for the reference : here is the full project :
https://github.com/szigetics/QtCreatorScrollProject
( This is actually exactly what QtCreator gives you when you create a new project. ) -
I wonder if this is a case of needing "the common hack" of passing all of the Qt framework
qml
as theqmldir
.My build script (yes, I run bash on windows) does it like so:
windeployqt "${FLAVOR}" --qmldir "${WINALLQML}" app.exe
Where WINALLQML is something like
C:/my_third_party_sources/Qt_desktop/5.15.0/msvc2019_64/qml
-
You'll really want to see what the STDOUT/STDERR (console output) is printing when you launch the
exe
.There should definitely be a warning or an error printed that would clarify what exactly is going wrong.
I don't often work on windows, so my knowledge of how exactly to see all the output is "spotty", but if you aren't seeing any output then I think you need to add
CONFIG+=CONSOLE
, as in...qmake.exe CONFIG+=CONSOLE path/to/project
-
@KH-219Design
Thank you for your reply.I have added
--qmldir "${WINALLQML}"
to the windeployqt call, so the whole call looks like this :
C:/Qt/5.12.2/msvc2017_64/bin/windeployqt.exe QtCreatorScrollProject.exe --release --qmldir c:\\Users\\<myUserName>\\Documents\\QtCreatorScrollProject --qmldir c:\\Qt\\5.12.2\\msvc2017_64\\qml
but I still got the same result (empty window - QML contents doesn't appear).
-
@just_a_developer said in Qml contents doesn't appear under Windows:
to the windeployqt call, so the whole call looks like this :
C:/Qt/5.12.2/msvc2017_64/bin/windeployqt.exe QtCreatorScrollProject.exe --release --qmldir c:\Users\<myUserName>\Documents\QtCreatorScrollProject --qmldir c:\Qt\5.12.2\msvc2017_64\qmlbut I still got the same result (empty window - QML contents doesn't appear).
Why do you have 2 time
--qmldir
in your command line? -
@KroMignon said in Qml contents doesn't appear under Windows:
Why do you have 2 time
--qmldir
in your command line?Originally I only had one
--qmldir
. I added the additional one as per @KH-219Design 's suggestion.
windeployqt
supports passing multiple--qmldir
s : here is the (beggining of the) output of theC:/Qt/5.12.2/msvc2017_64/bin/windeployqt.exe QtCreatorScrollProject.exe --release --qmldir c:\\Users\\<myUserName>\\Documents\\QtCreatorScrollProject --qmldir c:\\Qt\\5.12.2\\msvc2017_64\\qml
call :C:\Users\<myUserName>\Desktop\5\QtCreatorScrollProject.exe 64 bit, release executable [QML] Scanning c:\Users\<myUserName>\Documents\QtCreatorScrollProject: QML imports: 'QtQuick' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick.2 'QtQuick.Controls' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls.2 'QtQuick.Templates' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Templates.2 'QtQuick.Window' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Window.2 'QtQuick.Controls.Fusion' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls.2\Fusion 'QtQuick.Controls.Imagine' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls.2\Imagine 'QtGraphicalEffects' C:\Qt\5.12.2\msvc2017_64\qml\QtGraphicalEffects 'QtGraphicalEffects/private' C:\Qt\5.12.2\msvc2017_64\qml\QtGraphicalEffects\private 'QtQuick.Controls.Material' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls.2\Material 'QtQuick.Controls.Universal' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls.2\Universal Scanning c:\Qt\5.12.2\msvc2017_64\qml: QML imports: 'QtQuick' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick.2 'QtQuick.Controls' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls.2 'QtQuick.Templates' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Templates.2 'QtQuick.Window' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Window.2 'QtQuick.Controls.Fusion' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls.2\Fusion 'QtQuick.Controls.Imagine' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls.2\Imagine 'QtGraphicalEffects' C:\Qt\5.12.2\msvc2017_64\qml\QtGraphicalEffects 'QtGraphicalEffects/private' C:\Qt\5.12.2\msvc2017_64\qml\QtGraphicalEffects\private 'QtQuick.Controls.Material' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls.2\Material 'QtQuick.Controls.Universal' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls.2\Universal 'Qt.labs.calendar' C:\Qt\5.12.2\msvc2017_64\qml\Qt\labs\calendar 'QtMultimedia' C:\Qt\5.12.2\msvc2017_64\qml\QtMultimedia 'QtQuick.Controls' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls 'QtQuick.Layouts' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Layouts 'QtQuick.Controls.Private' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls\Private 'QtQuick.Controls.Styles' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Controls\Styles 'QtQml.Models' C:\Qt\5.12.2\msvc2017_64\qml\QtQml\Models.2 'QtQuick.Extras.Private' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Extras\Private 'QtQuick.Extras' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Extras 'QtQuick.Dialogs' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Dialogs 'Qt.labs.folderlistmodel' C:\Qt\5.12.2\msvc2017_64\qml\Qt\labs\folderlistmodel 'Qt.labs.settings' C:\Qt\5.12.2\msvc2017_64\qml\Qt\labs\settings 'QtQuick.Dialogs.Private' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\Dialogs\Private 'QtQuick.PrivateWidgets' C:\Qt\5.12.2\msvc2017_64\qml\QtQuick\PrivateWidgets 'QtTest' C:\Qt\5.12.2\msvc2017_64\qml\QtTest 'QtWinExtras' C:\Qt\5.12.2\msvc2017_64\qml\QtWinExtras
-
-
@J-Hilk said in Qml contents doesn't appear under Windows:
Usage: windeployqt [options] [files]
options before the file!
I tried :
C:/Qt/5.12.2/msvc2017_64/bin/windeployqt.exe --release --qmldir c:\\Users\\\<myUserName>\\Documents\\QtCreatorScrollProject QtCreatorScrollProject.exe
but I still got the same result (empty window - QML contents doesn't appear).
(Side note : the directory layout for the output is the same for
windeployqt [options] [files]
andwindeployqt [files] [options]
) -
@just_a_developer said in Qml contents doesn't appear under Windows:
the directory layout for the output is the same
can you share a screenshot from that?
-
@J-Hilk said in Qml contents doesn't appear under Windows:
@just_a_developer said in Qml contents doesn't appear under Windows:
the directory layout for the output is the same
can you share a screenshot from that?
Sure. Here it is :
tree /f Folder PATH listing for volume <masked> Volume serial number is <masked> C:. β D3Dcompiler_47.dll β libEGL.dll β libGLESV2.dll β opengl32sw.dll β Qt5Core.dll β Qt5Gui.dll β Qt5Network.dll β Qt5Qml.dll β Qt5Quick.dll β Qt5QuickControls2.dll β Qt5QuickTemplates2.dll β Qt5Svg.dll β Qt5Widgets.dll β QtCreatorScrollProject.exe β ββββbearer β qgenericbearer.dll β ββββiconengines β qsvgicon.dll β ββββimageformats β qgif.dll β qicns.dll β qico.dll β qjpeg.dll β qsvg.dll β qtga.dll β qtiff.dll β qwbmp.dll β qwebp.dll β ββββplatforminputcontexts β qtvirtualkeyboardplugin.dll β ββββplatforms β qwindows.dll β ββββqmltooling β qmldbg_debugger.dll β qmldbg_inspector.dll β qmldbg_local.dll β qmldbg_messages.dll β qmldbg_native.dll β qmldbg_nativedebugger.dll β qmldbg_preview.dll β qmldbg_profiler.dll β qmldbg_quickprofiler.dll β qmldbg_server.dll β qmldbg_tcp.dll β ββββQtGraphicalEffects β β Blend.qml β β BrightnessContrast.qml β β Colorize.qml β β ColorOverlay.qml β β ConicalGradient.qml β β Desaturate.qml β β DirectionalBlur.qml β β Displace.qml β β DropShadow.qml β β FastBlur.qml β β GammaAdjust.qml β β GaussianBlur.qml β β Glow.qml β β HueSaturation.qml β β InnerShadow.qml β β LevelAdjust.qml β β LinearGradient.qml β β MaskedBlur.qml β β OpacityMask.qml β β plugins.qmltypes β β qmldir β β qtgraphicaleffectsplugin.dll β β RadialBlur.qml β β RadialGradient.qml β β RectangularGlow.qml β β RecursiveBlur.qml β β ThresholdMask.qml β β ZoomBlur.qml β β β ββββprivate β DropShadowBase.qml β DropShadowBase.qmlc β FastGlow.qml β FastGlow.qmlc β FastInnerShadow.qml β FastInnerShadow.qmlc β FastMaskedBlur.qml β FastMaskedBlur.qmlc β GaussianDirectionalBlur.qml β GaussianDirectionalBlur.qmlc β GaussianGlow.qml β GaussianGlow.qmlc β GaussianInnerShadow.qml β GaussianInnerShadow.qmlc β GaussianMaskedBlur.qml β GaussianMaskedBlur.qmlc β qmldir β qtgraphicaleffectsprivate.dll β ββββQtQuick β ββββControls.2 β β β AbstractButton.qml β β β Action.qml β β β ActionGroup.qml β β β ApplicationWindow.qml β β β BusyIndicator.qml β β β Button.qml β β β ButtonGroup.qml β β β CheckBox.qml β β β CheckDelegate.qml β β β ComboBox.qml β β β Container.qml β β β Control.qml β β β DelayButton.qml β β β Dial.qml β β β Dialog.qml β β β DialogButtonBox.qml β β β Drawer.qml β β β Frame.qml β β β GroupBox.qml β β β ItemDelegate.qml β β β Label.qml β β β Menu.qml β β β MenuBar.qml β β β MenuBarItem.qml β β β MenuItem.qml β β β MenuSeparator.qml β β β Page.qml β β β PageIndicator.qml β β β Pane.qml β β β plugins.qmltypes β β β Popup.qml β β β ProgressBar.qml β β β qmldir β β β qtquickcontrols2plugin.dll β β β RadioButton.qml β β β RadioDelegate.qml β β β RangeSlider.qml β β β RoundButton.qml β β β ScrollBar.qml β β β ScrollIndicator.qml β β β ScrollView.qml β β β Slider.qml β β β SpinBox.qml β β β StackView.qml β β β SwipeDelegate.qml β β β SwipeView.qml β β β Switch.qml β β β SwitchDelegate.qml β β β TabBar.qml β β β TabButton.qml β β β TextArea.qml β β β TextField.qml β β β ToolBar.qml β β β ToolButton.qml β β β ToolSeparator.qml β β β ToolTip.qml β β β Tumbler.qml β β β β β ββββFusion β β β ApplicationWindow.qml β β β BusyIndicator.qml β β β Button.qml β β β ButtonPanel.qml β β β CheckBox.qml β β β CheckDelegate.qml β β β CheckIndicator.qml β β β ComboBox.qml β β β DelayButton.qml β β β Dial.qml β β β Dialog.qml β β β DialogButtonBox.qml β β β Drawer.qml β β β Frame.qml β β β GroupBox.qml β β β ItemDelegate.qml β β β Label.qml β β β Menu.qml β β β MenuBar.qml β β β MenuBarItem.qml β β β MenuItem.qml β β β MenuSeparator.qml β β β Page.qml β β β PageIndicator.qml β β β Pane.qml β β β plugins.qmltypes β β β Popup.qml β β β ProgressBar.qml β β β qmldir β β β qtquickcontrols2fusionstyleplugin.dll β β β RadioButton.qml β β β RadioDelegate.qml β β β RadioIndicator.qml β β β RangeSlider.qml β β β RoundButton.qml β β β ScrollBar.qml β β β ScrollIndicator.qml β β β Slider.qml β β β SliderGroove.qml β β β SliderHandle.qml β β β SpinBox.qml β β β SwipeDelegate.qml β β β Switch.qml β β β SwitchDelegate.qml β β β SwitchIndicator.qml β β β TabBar.qml β β β TabButton.qml β β β TextArea.qml β β β TextField.qml β β β ToolBar.qml β β β ToolButton.qml β β β ToolSeparator.qml β β β ToolTip.qml β β β Tumbler.qml β β β β β ββββImagine β β β ApplicationWindow.qml β β β BusyIndicator.qml β β β Button.qml β β β CheckBox.qml β β β CheckDelegate.qml β β β ComboBox.qml β β β DelayButton.qml β β β Dial.qml β β β Dialog.qml β β β DialogButtonBox.qml β β β Drawer.qml β β β Frame.qml β β β GroupBox.qml β β β ItemDelegate.qml β β β Label.qml β β β Menu.qml β β β MenuItem.qml β β β MenuSeparator.qml β β β Page.qml β β β PageIndicator.qml β β β Pane.qml β β β plugins.qmltypes β β β Popup.qml β β β ProgressBar.qml β β β qmldir β β β qtquickcontrols2imaginestyleplugin.dll β β β RadioButton.qml β β β RadioDelegate.qml β β β RangeSlider.qml β β β RoundButton.qml β β β ScrollBar.qml β β β ScrollIndicator.qml β β β Slider.qml β β β SpinBox.qml β β β StackView.qml β β β SwipeDelegate.qml β β β SwipeView.qml β β β Switch.qml β β β SwitchDelegate.qml β β β TabBar.qml β β β TabButton.qml β β β TextArea.qml β β β TextField.qml β β β ToolBar.qml β β β ToolButton.qml β β β ToolSeparator.qml β β β ToolTip.qml β β β Tumbler.qml β β β β β ββββMaterial β β β ApplicationWindow.qml β β β BoxShadow.qml β β β BusyIndicator.qml β β β Button.qml β β β CheckBox.qml β β β CheckDelegate.qml β β β CheckIndicator.qml β β β ComboBox.qml β β β CursorDelegate.qml β β β DelayButton.qml β β β Dial.qml β β β Dialog.qml β β β DialogButtonBox.qml β β β Drawer.qml β β β ElevationEffect.qml β β β Frame.qml β β β GroupBox.qml β β β ItemDelegate.qml β β β Label.qml β β β Menu.qml β β β MenuBar.qml β β β MenuBarItem.qml β β β MenuItem.qml β β β MenuSeparator.qml β β β Page.qml β β β PageIndicator.qml β β β Pane.qml β β β plugins.qmltypes β β β Popup.qml β β β ProgressBar.qml β β β qmldir β β β qtquickcontrols2materialstyleplugin.dll β β β RadioButton.qml β β β RadioDelegate.qml β β β RadioIndicator.qml β β β RangeSlider.qml β β β RectangularGlow.qml β β β RoundButton.qml β β β ScrollBar.qml β β β ScrollIndicator.qml β β β Slider.qml β β β SliderHandle.qml β β β SpinBox.qml β β β StackView.qml β β β SwipeDelegate.qml β β β SwipeView.qml β β β Switch.qml β β β SwitchDelegate.qml β β β SwitchIndicator.qml β β β TabBar.qml β β β TabButton.qml β β β TextArea.qml β β β TextField.qml β β β ToolBar.qml β β β ToolButton.qml β β β ToolSeparator.qml β β β ToolTip.qml β β β Tumbler.qml β β β β β ββββUniversal β β ApplicationWindow.qml β β BusyIndicator.qml β β Button.qml β β CheckBox.qml β β CheckDelegate.qml β β CheckIndicator.qml β β ComboBox.qml β β DelayButton.qml β β Dial.qml β β Dialog.qml β β DialogButtonBox.qml β β Drawer.qml β β Frame.qml β β GroupBox.qml β β ItemDelegate.qml β β Label.qml β β Menu.qml β β MenuBar.qml β β MenuBarItem.qml β β MenuItem.qml β β MenuSeparator.qml β β Page.qml β β PageIndicator.qml β β Pane.qml β β plugins.qmltypes β β Popup.qml β β ProgressBar.qml β β qmldir β β qtquickcontrols2universalstyleplugin.dll β β RadioButton.qml β β RadioDelegate.qml β β RadioIndicator.qml β β RangeSlider.qml β β RoundButton.qml β β ScrollBar.qml β β ScrollIndicator.qml β β Slider.qml β β SpinBox.qml β β StackView.qml β β SwipeDelegate.qml β β Switch.qml β β SwitchDelegate.qml β β SwitchIndicator.qml β β TabBar.qml β β TabButton.qml β β TextArea.qml β β TextField.qml β β ToolBar.qml β β ToolButton.qml β β ToolSeparator.qml β β ToolTip.qml β β Tumbler.qml β β β ββββTemplates.2 β β plugins.qmltypes β β qmldir β β qtquicktemplates2plugin.dll β β β ββββWindow.2 β plugins.qmltypes β qmldir β windowplugin.dll β ββββQtQuick.2 β plugins.qmltypes β qmldir β qtquick2plugin.dll β ββββscenegraph β qsgd3d12backend.dll β ββββstyles β qwindowsvistastyle.dll β ββββtranslations β qt_ar.qm β qt_bg.qm β qt_ca.qm β qt_cs.qm β qt_da.qm β qt_de.qm β qt_en.qm β qt_es.qm β qt_fi.qm β qt_fr.qm β qt_gd.qm β qt_he.qm β qt_hu.qm β qt_it.qm β qt_ja.qm β qt_ko.qm β qt_lv.qm β qt_pl.qm β qt_ru.qm β qt_sk.qm β qt_uk.qm β ββββvirtualkeyboard qtvirtualkeyboard_hangul.dll qtvirtualkeyboard_openwnn.dll qtvirtualkeyboard_pinyin.dll qtvirtualkeyboard_tcime.dll qtvirtualkeyboard_thai.dll
-
@just_a_developer Sorry tweaking the arguments didn't help.
What about watching what Qt is printing when you launch the exe?
I would still expect there is a warning or an error printed that would clarify what exactly is going wrong.
-
A bit more info :
Here is the output of the app when I run it withQML_IMPORT_TRACE=1
:> set QML_IMPORT_TRACE=1 > QtCreatorScrollProject.exe warning: Environment variable QT_LOGGING_TO_CONSOLE is deprecated, use QT_ASSUME_STDERR_HAS_CONSOLE and/or QT_FORCE_STDERR_LOGGING instead. QQmlImportDatabase::addImportPath: "C:/Users/User/Downloads/6/6/qml" QQmlImportDatabase::addImportPath: "qrc:/qt-project.org/imports" QQmlImportDatabase::addImportPath: "C:/Users/User/Downloads/6/6" QQmlImports(qrc:/main.qml)::addLibraryImport: "QtQuick" 2.12 as "" QQmlImports(qrc:/main.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick.2/qmldir" QQmlImportDatabase::registerPluginTypes: "QtQuick" from "C:/Users/User/Downloads/6/6/QtQuick.2" QQmlImports(qrc:/main.qml)::addLibraryImport: "QtQuick.Controls" 2.5 as "" QQmlImports(qrc:/main.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick/Controls.2/qmldir" QQmlImportDatabase::registerPluginTypes: "QtQuick.Controls" from "C:/Users/User/Downloads/6/6/QtQuick/Controls.2" QQmlImports(qrc:/main.qml)::addLibraryImport: "QtQuick" 2.0 as "QmlInternals" QQmlImports(qrc:/main.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick.2/qmldir" QQmlImports(qrc:/main.qml)::resolveType: "ScrollView" => "" QUrl("qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml") TYPE/URL QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::addLibraryImport: "QtQuick" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick.2/qmldir" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::addLibraryImport: "QtQuick.Controls" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick/Controls.2/qmldir" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::addLibraryImport: "QtQuick.Controls.impl" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::addLibraryImport: "QtQuick.Templates" 2.12 as "T" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick/Templates.2/qmldir" QQmlImportDatabase::registerPluginTypes: "QtQuick.Templates" from "C:/Users/User/Downloads/6/6/QtQuick/Templates.2" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::resolveType: "ScrollBar" => "" QUrl("qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml") TYPE/URL QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::addLibraryImport: "QtQuick" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick.2/qmldir" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::addLibraryImport: "QtQuick.Controls" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick/Controls.2/qmldir" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::addLibraryImport: "QtQuick.Controls.impl" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::addLibraryImport: "QtQuick.Templates" 2.12 as "T" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick/Templates.2/qmldir" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::resolveType: "Transition" => "QQuickTransition" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::resolveType: "Rectangle" => "QQuickRectangle" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::resolveType: "NumberAnimation" => "QQuickNumberAnimation" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::resolveType: "T.ScrollBar" => "QQuickScrollBar" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::resolveType: "SequentialAnimation" => "QQuickSequentialAnimation" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::resolveType: "PauseAnimation" => "QQuickPauseAnimation" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::resolveType: "State" => "QQuickState" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::resolveType: "PropertyChanges" => "QQuickPropertyChanges" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml)::addImplicitImport QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::resolveType: "T.ScrollView" => "QQuickScrollView" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::addImplicitImport QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::resolveType: "ScrollBar" => "" QUrl("qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml") TYPE/URL QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollView.qml)::resolveType: "ScrollBar" => "" QUrl("qrc:/qt-project.org/imports/QtQuick/Controls.2/ScrollBar.qml") TYPE/URL QQmlImports(qrc:/main.qml)::resolveType: "ListView" => "QQuickListView" TYPE QQmlImports(qrc:/main.qml)::resolveType: "ApplicationWindow" => "" QUrl("qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml") TYPE/URL QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::addLibraryImport: "QtQuick" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick.2/qmldir" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::addLibraryImport: "QtQuick.Window" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick/Window.2/qmldir" QQmlImportDatabase::registerPluginTypes: "QtQuick.Window" from "C:/Users/User/Downloads/6/6/QtQuick/Window.2" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::addLibraryImport: "QtQuick.Controls" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick/Controls.2/qmldir" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::addLibraryImport: "QtQuick.Controls.impl" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::addLibraryImport: "QtQuick.Templates" 2.12 as "T" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick/Templates.2/qmldir" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::resolveType: "Rectangle" => "QQuickRectangle" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::resolveType: "T.ApplicationWindow" => "QQuickApplicationWindow" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ApplicationWindow.qml)::addImplicitImport QQmlImports(qrc:/main.qml)::resolveType: "ItemDelegate" => "" QUrl("qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml") TYPE/URL QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml)::addLibraryImport: "QtQuick" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick.2/qmldir" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml)::addLibraryImport: "QtQuick.Controls" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick/Controls.2/qmldir" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml)::addLibraryImport: "QtQuick.Controls.impl" 2.12 as "" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml)::addLibraryImport: "QtQuick.Templates" 2.12 as "T" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml)::importExtension: loaded "C:/Users/User/Downloads/6/6/QtQuick/Templates.2/qmldir" QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml)::resolveType: "IconLabel" => "QQuickIconLabel" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml)::resolveType: "T.ItemDelegate" => "QQuickItemDelegate" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml)::resolveType: "Rectangle" => "QQuickRectangle" TYPE QQmlImports(qrc:/qt-project.org/imports/QtQuick/Controls.2/ItemDelegate.qml)::addImplicitImport QQmlImports(qrc:/main.qml)::resolveType: "QmlInternals.Component" => "QQmlComponent" TYPE QQmlImports(qrc:/main.qml)::addImplicitImport
Also : "Accessibility Insights for Windows" app shows that there is something there, it is just not visible :
-
@just_a_developer said in Qml contents doesn't appear under Windows:
"Accessibility Insights for Windows"
Wow! Bravo to "Accessibility Insights for Windows" . That's an amazing trick.
I noticed that earlier you mentioned that the machine where the problem occurs is a VM. I wonder if there is just an OpenGL problem/glitch due to the virtualization. Are there VM options/settings you can play with, like assigning your GPU, or toggling through various graphics acceleration options?
-
@KH-219Design said in Qml contents doesn't appear under Windows:
@just_a_developer said in Qml contents doesn't appear under Windows:
"Accessibility Insights for Windows"
Wow! Bravo to "Accessibility Insights for Windows" . That's an amazing trick.
I noticed that earlier you mentioned that the machine where the problem occurs is a VM. I wonder if there is just an OpenGL problem/glitch due to the virtualization. Are there VM options/settings you can play with, like assigning your GPU, or toggling through various graphics acceleration options?
"Are there VM options/settings you can play with, like assigning your GPU, or toggling through various graphics acceleration options?"
I am not sure if there is anything that I could do... It is a machine in vSphere and I don't really see any options that I could change which could be relevant...But : here is a bit more info :
- the app works well under a Windows7 VM (everything appears, including QML contents)
- the app doesn't show the QML contents under Windows8 and Windows10 VMs (empty window - QML contents doesn't appear)
Here is the context of the Windows7 VM (as shown by OpenGL Extension Viewer), where the QML contents does appear :
Here is the context of the Windows10 VM (as shown by OpenGL Extension Viewer), where the QML contents doesn't appear :
-
OK : I got the fix : it is a rendering issue.
When I force rendering via ANGLE, it works : Options for forcing rendering via ANGLE :
1.: setting theQT_OPENGL
environment variable toangle
. (I only tested this solution, and it works well.)
2.: compile Qt withconfigure ... -angle
.
3.: callQCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
before creating theQApplication
object .There is still an interesting thing : based on Qt's documentation, Qt libraries are compiled with
-opengl dynamic
which means that Qt should fallback to using the ANGLE renderer by itself (without me having to forcefully ask it to do that).
Ref.: https://doc.qt.io/qt-5/windows-requirements.html#graphics-drivers
Ref2.: https://doc.qt.io/qt-5/configure-options.html#opengl-options-for-windowsSo it seems like that this fallback mechanism is broken.
( A bit more info about the different renderers : https://wiki.qt.io/Qt_5_on_Windows_ANGLE_and_OpenGL )