QApplication
-
I want to run my file from vs code, but when compiling, the terminal outputs "QApplicatiom no such file or directory", what should I do about it? I specified all the paths in the Path, as well as in the js file, but still something goes wrong, but when I run without QApplication, everything works
-
@Nadia220 said in QApplication:
I want to run my file from vs code, but when compiling, the terminal outputs "QApplicatiom no such file or directory"
Hi and welcome,
is it a typo on your side?
QApplicatiom
is misspelled.
If correct in your code, how did you integrate Qt in VSCode?!Did you install all required and helpful extentions and set the QT_DIR correctly?
Check this video on how to setup VSCode correctly:
You might want to add how you installed Qt, what version you are using and what OS you are on
-
@Pl45m4 No, it says "QAplication", that's right. I have Windows. I installed Qt 6 from the repository from GitHub, I also had Qt in Msys2, everything started there from the very Qt creator, and the same error occurred in vs code. I will try to either reinstall, or I have no idea why there is no such file or folder in either Msys2 or the Qt repository. Correction: I cannot officially install Qt, because it gives an error that it is impossible to install Qt from this IP address, vpn does not help the case
-
Hm strange... Dont know what Msys2 is and never used it, but I think you are not the only person who uses it.
So the chance that there is missing a file in the Msys2 Qt package or in GitHub, is very small.
If Qt with QtCreator also doesn't work, your installation is probably not quite right.Correction: I cannot officially install Qt, because it gives an error that it is impossible to install Qt from this IP address, vpn does not help the case
Are you in Russia by any chance?
-
@Nadia220 said in QApplication:
Yes, I am from Russia
The Qt Company decided to block Russian IP addresses in 2022... :(
So the official online Installer currently doesn't work in Russia anymore.
It's sad, but we can't do anything about it. Some day they will unbann it again, but until then you have to find other ways to install Qt... as you said, for example, via GitHub and build from source.There is a file in the Msys/mingw/include file, like a QAplication document, but there is no folder, I do not understand what is wrong 🤨
Your "File or directory not found" is a generic message when something wasn't found.
Since you probably#include <QApplication>
in yourmain.cpp
it is looking for aqapplication.h
header file... and can not find / locate it...
Either your Qt installation isn't 100% right and/or some paths are not set.@Nadia220 said in QApplication:
What is QT_DIR? I have not seen this
QT_DIR
is an environment variable which helps to locate your Qt installation "home" dir... Something like"C:\Qt\6.8.0\"
Can't help you with Msys, but when using QtCreator, you should find your Qt installation.
Check if your JSon config files for your VSCode workspace are really configured correctly (compare with the video and change your paths accordingly so it matches your Qt installation on your computer)