Cannot find feature windows_vulkan_sdk in qt - qt

I have newly installed Qt and when I tried to open my projects and have not even tried to compile, I got this mysterious cannot find feature windows_vulkan.
My QT has been working earlier but I had to reinstall it because it complained I had missing libicuun65.dll and libicuuc65.dll and recommended reinstallation. I have removed everything and installed qt from scratch.
Below is my error
I went into the directory it specified and clearly see the file. I am just not sure the content of the file is complete as it only contains 2 lines below:
load(windows_vulkan_sdk)
QMAKE_LIBS_VULKAN =
Maybe there are lib that are missing like libicuun65.dll and libicuuc65.dll and/or others?
Also, please note the uncompleted "Prepare C++ code Model" status bar. It has never completed as I saw it there for hours...it should not take that long.
What should I do to rectify this issue? Please help.
Update: My paths are set up too...

I think I understand why this happens for you, you install your Qt in Drive D but install Vulkan SDK in Drive C.
These should be on the same Drive.
Maybe Qt can't find your Vulkan SDK because of that please reinstall Vulkan SDK in Drive D.
another thing is this link in bugreports.qt.io
and also this GitHub issue.
They have problems like you and their compiler was MSYS2.
In
\msys64\mingw32\qt5-static\share\qt5\mkspecs\common\windows-vulkan.conf
changed:
From: load(windows_vulkan_sdk)
To: load(win32/windows_vulkan_sdk)

Related

Is there a easy way to protect, or revert Qt source code?

I just accidentally refactored QList to QSet, and Qt faithfully did it, to all of its own sources too... (yup, that was dumb!)
Thankfully my code is source controlled, I just reverted everything, would it be feasible/sensible to make a git repo for the Qt sources too? (I have the free version so I didn't think I could modify them anyway...?)
Is there a hidden setting that will prevent its sources from being modifiable, to stop me from doing this again?
I'm currently using the maintenance tool to install a newer version of Qt, but other than update or add/remove, there wasn't a re-install option that I could see, am I missing something?
There's no point to using source code control for an install: it's not source code. It's artifacts. You already know how to protect artifacts of all sorts from modification. Proper filesystem attributes will do it just fine.
Your finished Qt installation should not be writable by you. It would be by default on Unix systems when installed using a privileged package manager. Elsewhere: you need to make it read only. If you build from source, then recursively making the install folder read-only as the last step after installation is all it takes; and since you should be already automating your Qt build, then adding the "make read-only" step is trivial.
Thankfully my code is source controlled, I just reverted everything, would it be feasible/sensible to make a git repo for the Qt sources too? (I have the free version so I didn't think I could modify them anyway...?)
Feasible? Definitely. Sensible? Perhaps, assuming that by "make a git repo" you mean "cloning the official Qt repos from Git". It depends on how many times you plan on making the same renaming mistake. :D But seriously, I think there are benefits to building Qt yourself:
You can easily debug and check the implementation of API that you're using.
You can configure Qt to skip building stuff that you're not interested in.
You can easily patch Qt if there's a bug that you know of a fix for but hasn't been merged into Qt itself yet.
There are downsides too, though. You might run into build issues if you're using configure flags that the CI doesn't use (such as a -no-foo option). It can take a while to build depending on how many submodules you have and what kind of machine you're building on.
In general, if you're not using API that's in dev and not yet released, it's probably not worth bothering.
If you're still interested, this page has instructions for building Qt from Git:
https://wiki.qt.io/Building_Qt_5_from_Git
Is there a hidden setting that will prevent its sources from being modifiable, to stop me from doing this again?
Couldn't you set some permissions on the source directory? I've never had to do this, but have been bitten by it on unrelated occasions before, so I know it works. :D
I'm currently using the maintenance tool to install a newer version of Qt, but other than update or add/remove, there wasn't a re-install option that I could see, am I missing something?
Remove and add is your only option, I think. Otherwise, you can always keep a backup of the source by just copying the whole directory.

OpenGL Widget works in creator but black when launched from .exe

I have been working on a Qt OpenGL project for a bit now for some school work. I had to re-build Qt 5.0.1 for my windows machine so I could use OpenGL proper. At the end of this project I need to turn over the files and any executables, so I figured I could take the release .exe and stick it in a .zip for use.
I followed instructions online of making sure I place any needed .dll's into the .exe's dir. For my project there are 10:
icudt49, icuin49, icuuc49, libEGL, libGLESv2, Qt5Core, Qt5Gui, Qt5OpenGL and Qt5Widgets
I took these files all from:
C:\Qt\Qt5.0.1\5.0.1\msvc2010\bin
on my system.
Issue is the .exe will run and I get the UI and all. But the OpenGL scene is just black. I can still click objects in the scene, evidently zoom in and out and all that. I assume thats just the Qt translating the commands still. But nothing is visible. I'm unsure what the problem can be because it all works fine when launched from the creator.
EDIT: So, with all the dlls in the release folder, running the project from within creator will also have a black screen, when I remove them, it runs well. So perhaps one of the dll's is just wrong?
Also:
I looked online about publishing with Qt Creator and found not too much aid, said I should start from completely rebuilding Qt Creator staticly, but I'm sure the guide I had followed did this, however I still can't publish from the build menu, so I stuck with the above method.
I suggest, that you open every of the DDLs in your Zip file with Dependency Walker (http://www.dependencywalker.com/). It should display information about dependencies from one of your QtXXX.dll files to other files. If one of the dependencies is missing, you know where to look next. You can also try to open your executable with Dependency Walker. I haven't used the program for a long time so I don't remember if opening an executable is the only way it works. Anyway, here are the reasons why you might want to use the tool: http://www.dependencywalker.com/help/html/overview_1.htm
This question might also be helpful:
At least one module has an unresolved import due to a missing export function in an implicitly dependent module
Good luck!
So the ultimate issue was the use of the correct DLLs. Using something like DependenyWalker can help you to note which DLLs may be missing, however it did nothing in my case.
I had installed Qt once, and also rebuilt, uninstalled and re-installed it. However all the libraries it was calling from as no longer in C:\Qt\Qt5.0.1\5.0.1\msvc2010\bin as expected, it was calling from the github repository where I built it C:\Users\User\Documents\GitHub\qt5. Once this is sorted out, it still required a framework folder and then it works as expected.
1) Copy the correct DLL files to the release folder of the build.
2) Create a folder in the same dir as the .exe named "platforms". (Note: elsewhere has said create plugins>platforms, but this will not work with newer Qt versions)
3) From the same source you got the other DLLs, copy qwindows.dll to the platforms folder you created.
4) Run the executable and enjoy.
As long as the system you're running on is capable of your OpenGL structure, it should be fine.

Adding Qt Sources to QtCreator 2.4.1

I am currently using QtCreator 2.4.1 with Qt 4.7.4 development libraries (in Ubuntu) and am trying to track down a bug which after profiling with valgrind seems to occur internally within QGraphicsView::paintEvent(…) method
To help isolate this problem I would like to step into the Qt sources. Having done some searching through both the Qt forums and stack overflow and have not being able to find a way to integrate the sources with my version of QtCreator.
I have currently tried downloading the sources via the QtSDK manager and adding a “Source Path Mapping” within Tools->Options->Debugger. I am sure that this step is where I am making a mistake as I am unable to even switch to source when viewing internal Qt header files i.e. from QGraphicsView.h
I have so far tried adding the following Source Path Mappings
Source Path=/var/tmp/qt-src
TargetPath=/home/paul/QtSDK/QtSources/4.7.4
and
Source Path=/var/tmp/qt-src
TargetPath=/home/paul/QtSDK/QtSources/4.7.4/src
Neither works.
I have also tried building Qt directly from source, adding this to my "Qt versions" list within Qt Creator and creating a new project configuration using this version. This also did not work.
Likewise I have tried adding the src folders to my gdbinit file. This also fails to work.
I am completely lost with this.
Paul
Someone asked a similar question here: Need to step into Qt sources (my IDE is Qt Creator).
Someone else asked about Valgrind errors with Qt here: Suppression files for Qt memory leaks with Valgrind
And here is a little more info about Using Valgrind with Qt Creator along with some explanation about how to read the results. Its a little dated from late 2010.
Related Suggestions
I wouldn't debug the QGraphicsView class just because of all the effort to make it work or find the problem might be for nothing... Qt is moving to using the SceneGraph as the backend for QML and the rendering engine for QGraphicsView might become obsolete.
Updating to the latest stable build of the Qt libraries may make a big difference for QGraphicsView.
If you post the valgrind error you are getting to the Qt Trolls, someone might be able to explain what is going on for you.
There are other debugging techniques besides the traditional debugger. I've been programming in Qt in Windows (without valgrind) and with a large multi-threaded application, that loads a bunch of Dll's. I've had to put some faith into the Object Tree Model clean up and work on all the new calls I put in. Most of the time I just use QDebug to find errors. Then I am also using a combination of qInstallMessageHandler() with QDebug to implement decent logging for the hard to track bugs.
See also Qt Debugging Techniques.

Error building QtCore

I am trying to build QtCore.lib and I get this weird error.
PRJ0019: A tool returned an error code from "MOC kernel\qtimer.cpp"
I am able to build qtmain.lib but not able tp go any further.
moc.exe is available in bin folder and the path is added to my PATH.
kernel\qtimer.cpp file is also present in corelib folder.
Any help in this regard will be appreciated. I am building with Qt-4.5.2 source.
In Qt 4.5.2 moc.exe has some issues. An email I sent to Qt Support mentions it moc'ing files that were not modified. It could have further issues, which could be related to what you are experiencing.
Sorry I can't recall the exact details. To make things worse the link Qt Support had sent me at the time is broken.
They had suggested using 4.5.3. I think we ended up staying on 4.5.1, which we are still using today, although the move to 4.7.x. is occurring as I write this. :)

Problem installing QT on Vista

I have downloaded QT SDK LGLP (Creator + libraries) 4.6 and I am having problems compiling projects. After install I have added C:\Qt\2010.02\qt;C:\Qt\2010.02\qt\bin to PATH and added QTDIR env varaible containing C:\Qt\2010.02\qt, the I run "configure -platform win32-g++" to compile it. Everything went good.
I the tried to use QT Creator to create and compile a project.
The problem is everytime I try to compile I get the following error message:
No valid Qt version set. Set one in Tools/Options
Error while building project GUITest
When executing build step 'QMake'
Canceled build.
When I go to Tools/Options the manual version is set to v4.6.2, Location c:\qt\2010.02\qt\bin\qmake.exe. The auto detected version is set to even though I have added the dirs in Path. Is there something I am doing wrong here? Has anyone encountered this problem in Vista.
I have been working on this for 2 days, change configurations, reinstalled etc...
The QtDir value is compiled into the
qmake-binary. You can only change this
by recompiling qmake and passing on a
different value to qt-configure (I'm
not sure which setting or variable is
passed on to qmake) When using
precompiled, downloaded binaries,
you'll have to keep the QtDir at
c:\Qt\4.6.2
EDIT:
What I said was incorrect. The locations of qmake, moc,... are located in the file:
<Qt>/4.x.x/.qmake.cache
Try uninstalling/reinstalling qt creator
But i highly suspect you didnt compile qt properly as this problem seems really odd. I had alot of problems compiling so i know myself from the past mistakes.
Make sure you carefully reread install instructions for your environment, also if you have visual studio you need to follow procedure to install it in compliance with it. Same if you use another c compiler
If nothing goes right, the easiest way to install qt imo is directy from their git hub, chec installin qt from git, on their git site there is wiki that explains how to do it
its really easy and after that all you need to do is add the qt to creator
Hey, it QT emulators have lot of problems in vista, i have tried several times,it didnt work for me.. it works well with windows XP. though ill tell you in brief what you need to do
1)install latest perl
2)install carbide c++ editor
3)install Qt SDK
4)install s60 or N97 emulators
make sure that except perl all the items which are mentioned above will be in same drive,and also
make sure that folder names which you give while installation should not have spaces at all..
i.e suppose if you are going to place any of the above items in a folder whose name is having spaces it will not work.
if you have any doubts feel free to ask.

Resources