i need help in the QT installation
-
hi! so i'm installing QT (the open source one) so i can use some of the modules like "Q core" "Qwidgets" and some functions like "uic", during the installation of QT i'm not sure what boxes should i check in the personalized installation for me to work with thoses modules and functions . all i need it for is just a simple qt designer display of a temperature. i really need some help guys!
-
Do you use the Online Installer?
i'm not sure what boxes should i check in the personalized installation for me to work with thoses modules and functions
If you are not sure what to pick and just start to use Qt for Qt Widget applications, go for the pre-configured installation.
Don't know what the latest version in Online Installer currently shows, but it says something like
Qt 6.7 for Desktop Development
.
Can't do wrong with this. There is QtCreator (the IDE with QtDesigner), the Qt Framework itself and every tool you need to start writing your first app, included -
after installing the Qt 6.7 i tried to use the uic function to convert my .ui file into a .h file but this error comes .
uic : Le terme «uic» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou programme exécutable. Vérifiez l'orthographe du nom, ou si
un chemin d'accès existe, vérifiez que le chemin d'accès est correct et réessayez.
Au caractère Ligne:1 : 1- uic tempersensor.ui -o tempersensor_ui.h
-
+ CategoryInfo : ObjectNotFound: (uic:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
sry it's in french but it translates to "The term "uic" is not recognized as a cmdlet name, function, script file, or executable program. Check the spelling of the name, or if
a path exists, verify that the path is correct and try again." when i asked chat gpt it told me to add that directory to my system's PATH environment variable.how am i supposed to do that. -
@Sadok_J said in i need help in the QT installation:
when i asked chat gpt it told me to add that directory to my system's PATH environment variable.how am i supposed to do that.
So if you asked ChatGPT for that advice why not ask it to show you how to add to your system's PATH environment variable?
-
it did give an answer but a complicated one . so thought i would ask experts first before i do something i don't fully understand.
i thought the answer would be like to copy the full Qt directory and paste it into my project one but the chat gave an answer that i don't fully understand it -
How do you build your project? With CMake, qmake or Qt VS Addin?
-
CMake i think
-
@Sadok_J said in i need help in the QT installation:
CMake i think
I think ... this does not help at all.
Please show your CMakeLists.txt and how you created your Visual Studio Solution file. -
here's the thing :
i have my project which contains the VSCODE code and the .ui design, in a folder
and the installation of QT in another seperate folder . i just want to know how to link the two so i can use the function and the modules installed. -
Do you really think we can do anything with this screenshot? Please post the CMakeLists.txt as text.
VSCODE code
What does this mean? VSCode is an IDE, not some code.
-
this is CMakelists.txt as text:
Copyright (C) 2022 The Qt Company Ltd.
SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project(proj LANGUAGES CXX)
add_library(lib1 SHARED lib1.cpp)add_custom_target(print_lib_path ALL
COMMAND ${CMAKE_COMMAND} -E echo "###$<TARGET_FILE:lib1>###"
VERBATIM
)
add_dependencies(print_lib_path lib1).
and about the VSCode, it is an IDE that i'm working with to build and compile -
this another CMakelist.txt
Copyright (C) 2022 The Qt Company Ltd.
SPDX-License-Identifier: BSD-3-Clause
The test represents the order-related issue that we have with the ld linker.
CMake versions < 3.21.0 produce the following linker line:
<binary_name> main.cpp -o static_link_order_test libstaticLib.a objlib.cpp.o
Since 'static_link_order_test' doesn't have direct use of 'staticlib2.cpp.o' symbols
the translation unit is not linked. When we link objlib.cpp.o it cannot resolve symbols from
staticlib2.cpp.o.
For now it's only applicable for ld-like linkers. 'lld' has no such issue.
cmake_minimum_required(VERSION 3.16)
project(static_link_order_test LANGUAGES CXX)
add_library(objLib OBJECT objlib.cpp)
add_library(staticLib STATIC staticlib1.cpp staticlib2.cpp)target_link_libraries(staticLib
INTERFACE objLib "$<TARGET_OBJECTS:objLib>"
)add_executable(static_link_order_test main.cpp)
target_link_libraries(static_link_order_test PRIVATE staticLib)
i'm sorry i'm a beginner in this and starting this project without any past experience, just bear with me please