Creating a Qt Quick Application tutorial
-
I am new to Qt. So I am trying the tutorials. The first one I tried was "Creating a Qt Quick Application". Nothing in this tutorial even matches the files generated by 5.3, 5.4 or 5.5 versions. I understand that this is an evolving product but if the tutorials aren't staying up with the versions, it makes it hard for me to learn how to use this tool.
-
Hi @rbmisc, and welcome to the Qt Dev Net!
The first one I tried was "Creating a Qt Quick Application". Nothing in this tutorial even matches the files generated by 5.3, 5.4 or 5.5 versions.
Do you mean http://doc.qt.io/qtcreator/qtcreator-transitions-example.html ? It looks like there's a typo in the tutorial. In Step #1, you should select File > New File or Project > Application > Qt Quick Controls Application (not Qt Quick Application)
-
Thanks. Also I found that if states.svg isn't in the projects folder, it isn't displayed in the Resource tab on the Design section. I tried adding it to the Resource section of the project from the directory I found it in, but it still didn't show up. So I put a copy in the project file and then showed up.
I have another frustration. I was able to build and run this project yesterday. Today when I build it, I get the LINK1104: cannot open file 'shell32.lib'. I know the directory with this file is in the system environment PATH statement. I even see it when I go to Projects and look at System Environment details there. So why isn't this seen when I build?
-
You're welcome :)
@rbmisc said:
Thanks. Also I found that if states.svg isn't in the projects folder, it isn't displayed in the Resource tab on the Design section. I tried adding it to the Resource section of the project from the directory I found it in, but it still didn't show up. So I put a copy in the project file and then showed up.
Yes, the documentation says you must copy it into your project folder (2nd paragraph under "Creating the Main View"):
To use the states.svg image in your application, you must copy it to the project directory (same subdirectory as the QML file) from the examples directory in the Qt installation directory.
I have another frustration. I was able to build and run this project yesterday. Today when I build it, I get the LINK1104: cannot open file 'shell32.lib'.
Did your code, your build tools, or your build environment change between yesterday and today?
I know the directory with this file is in the system environment PATH statement. I even see it when I go to Projects and look at System Environment details there. So why isn't this seen when I build?
Linkers don't check your PATH.
Did you add the dependency to shell32.lib on purpose? If so, tell your build tools where to find it; http://stackoverflow.com/questions/28105824/qt-fails-to-open-shell32-lib-even-when-included
If you didn't add the dependency to shell32.lib on purpose, then something has been corrupted.
I know the directory with this file is in the system environment PATH statement.
I generally discourage people from adding software development tools to the system PATH. This is not necessary, and can cause problems.
It is much safer to leave it out of the system PATH, and only bring it in whenever you need it. For example, to use Visual C++ from the command prompt, just run the Visual Studio Developer Command Prompt.
-
I see I missed the information about copying the file.
Thanks for the link. The reference to the pro file for the one in that link has more in it than the pro file I have for this application. I don't have any references to paths or libraries. The only place I see paths is in System Environment for Projects for this example. I am using At version 5.5.0.
-
@rbmisc said:
The reference to the pro file for the one in that link has more in it than the pro file I have for this application. I don't have any references to paths or libraries.
The other user tried to link external libraries manually, that's why his/her .pro file has extra bits.
I wasn't sure if you were able to resolve your issue? If not, see midhun's answer in the link I gave you before.