qt
qt copied to clipboard
Compiling for Windows shows a command prompt
When I compile for OSX, all is good app opens, everything working well. When I [cross-]compile for Windows it works all good, however I also get a command prompt window appearing. Is there any way to stop this happening? Reading around it suggests I can do this:
qtdeploy -ldflags -H=windowsgui -docker build windows_32_shared
however that doesnt seem to fix it.
Thanks
Hey
Yeah, the command prompt should be already hidden on windows. (qtdeploy actually sets -H=windowsgui
by default)
Does the prompt disappear when you use the windows_32_static
image? Or some of the 64 bit images? Or if you deploy your application on windows while using the regular installation?
IIRC this was triggered by importing some sub-package, I will try to find the issue where this was first mentioned.
Could you maybe list the qt
sub-package that you make use of?
Found an related issue: https://github.com/therecipe/qt/issues/412
Thanks for getting back to me, when I static compile I have the same issue, I am using a windows 7 32 bit VM.
Sure, how do I find the qt sub-package?
A
You can run go list -f {{.Deps}}
in the root folder of your project to get a list of all your dependencies.
I just need a list of all the qt related packages you make use from. (widgets, qml, quick, ...)
Cool, I think this is what you mean:
github.com/therecipe/qt
github.com/therecipe/qt/core
github.com/therecipe/qt/gui
github.com/therecipe/qt/network
github.com/therecipe/qt/qml
github.com/therecipe/qt/quick
github.com/therecipe/qt/widgets
Thanks, I will look into this.
Interesting, after changing away from an ApplicationWindow in the Qml, I no longer get the command prompt in windows. (At least that I think is the major change I can see...)
lol, now when I run it even from the command prompt, I can't see the logs 🤣
Ah, I think that I got an idea. Will do some tests and report back.
I made some changes, so now you should never see the command prompt at all on windows: https://github.com/therecipe/qt/commit/49a0021f932c3446cda48796e4871093d8189a66
Will look into how to handle this during development on windows.
Yeah be cool to have a debug flag or something for this