Qt SDK on Windows: how to use Assistant - windows

After installing Qt SDK on Windows, I don't see any Help item in the Qt SDK menu. QtCreator\bin directory contains assistant.exe, and Documentation directory contains *.qch files. Is it possible to create a shortcut showing Qt Assistant with Qt SDK reference?

You can add these .qch files by going to the menu Edit > Preferences > Documentation > Add...
You should only need to do that once.

Related

Cannot add qt version to qt visual studio plugin

I'm using Visual studio 2019 and I've added the Qt Visual Studio Tools plugin from the "Manage Extensions" window. I've installed the latest version 2.7.2.2.
When I try to add a Qt version, in Options->Qt->Versions, I'm able to add the Qt that I've installed (that I use with CMake etc, so I know that's working), and I save it.
When I save, close and reopen the same window, the version disappears, like the plugin is not able to save the configuration.
I'm not able to find any logs that tell me what did wrong, so:
Where can I find logs for checking the error when trying to add the Qt version?
Where the configuration should be stored?
If I know where the data are stored, I can try to add the configuration manually instead of using the GUI, hoping that it will fix the problem.
i came across the same error. Then if you look at the 'output' of VS when you click ok after setting the QT version, you may see the same error message saying that qt license is not found. Try download the license file from QT, rename it as .qt-license, and put it under c:/Users//

DirectX in Windows 8 SDK

Summary: Should directX include files be removed from applications targeting Windows 8?
Details:
I'm new to developing in Windows and I'm trying to get the NVIDIA SDK to compile on Windows 8 with Visual Studio 2012 (if possible). When compiling I've gotten an error message: Cannot open include file: 'd3dx9.h': No such file or directory.
I've read the Where is the DirectX SDK? article, but I'm confused about what it is saying to do.
Assuming that I don't care about Windows 7 and only want to test desktop applications on Windows 8 (ignoring Metro for now), do I need to keep the includes such as #include <d3dx9.h> and #include <d3dx11.h> that are in the NVIDIA SDK app, or should I remove these includes? If I do keep them what do I need to install so that the files can be found.
These samples was intended to be built with DirectX SDK and Windows SDK (pre-Win8).
However, Microsoft does not recommend to use D3DX* stuff anymore (among others). They deprecated standalone DirectX SDK, stripped d3dx*.h and d3dx*.lib files and merged remains to Windows 8 SDK.
So, to build samples you must use:
For DirectX headers/libs: old standalone DirectX SDK (Jun 2010)
For other Windows headers/libs: Windows 7 SDK -OR- Windows 8 SDK in "XP mode"
(Project Properties -> General -> Platform Toolset -> v110_xp )
To prevent mixing headers and libs, it is better to set exact paths to them in "VC++ Directories".
For your own new projects it is better not to use DirectX SDK, but use DirectX headers from Windows 8 SDK.
Make sure that you get the latest DirectX SDK. It has the header files.
Try to follow this step, hope this ll solve ur problem
Link the Include and Library directories
Open Visual Studio 2012
Select C++
Select A Blank Project
Go to Project Menu > Properties
In the window that opens up, on the left, Click on Configuration Properties > VC++ Directories
Click on Include Directories on the right.
Click on the Down Arrow and click on Edit
A window will pop up,Click on the Yellow folder icon on the top-right.
Click on the '...' icon the right if the line. A 'Select Folder' Window Will pop up.
Go the the folder where you have installed DirectX SDK. If nothing is changed, it will be in
C:\Program Files (x86)\Microsoft DirectX SDK.
Get inside the Include Directory and Click on 'Select Folder'. Click Ok.
Now Select 'Library Directories' and do the same Step 7 to Step 10
Go inside the Lib\x86 Folder and click on 'Select Folder'.
Click OK. Now all the Directories are linked. But we still need to link the header files. Add a new source file.
Type the Following code at the top of the file to include the Direct3D header files:
#include <d3d11.h>
#include <d3dx11.h>
14. Well that's all. You need to do this to configure DirectX for Visual C++ 2012 Project.
You can take a look from here
d3dx11.h missing?
and
Cannot open include file "d3dx9.h"
Thanks !!!

netbeans not found Qt Designer

When i want to open a .ui file in netbeans, its alert that: Failed to start Qt Designer. Make sure it is installed and added to PATH
I use win vista and opensource Qt 4.8.4 and Qt creator 2.6.1 in Addr. C:\Qt\qtcreator-2.6.1\bin\qtcreator.exe
and i have Qt designer in Addr. C:\Qt\4.8.4o\bin\designer.exe
my netbeans build tools options qmake set on C:\Qt\4.8.4o\bin\qmake.exe
thanx
PATH is a Windows environment variable. It is a list of paths that the OS uses to look for executables and libraries.
You need to add the path to Qt Designer to that list. Right-click on 'My Computer', hit 'Properties', go to 'Advanced system settings', and click on the 'Environment Variables' button. Find 'Path' (or 'PATH') in the System Variables group, and click edit. The paths are delimited by a semi-colon, add the Qt Designer path to the end.

How to convert a regular win32 (VC++ vcproj) project to a Qt project?

How can I convert existing vcproj files to project files that the QT add-in to Visual Studio recognizes and treats as valid Qt projects?
Should I just bite the bullet and create new projects to replace the old ones, and then add existing code?
I am using QT 4.6 and VS 2008 with Qt Add-in 1.1.2.
Original vcproj files have NOT been generated with QMake.
Using Visual Studio 2010+ it is now possible to convert a project to a Qt Addin project, using the "Convert project to Qt Add-in project" feature of the Qt Addin.
The following steps are from the work around in bug QTVSADDINBUG-27. This was tested with Visual Studio 2010, but should work similarly with new versions:
Right click on your project in "Solution Explorer", click on "Unload Project"
Right click on your project in "Solution Explorer", click on "Edit .vcxproj"
Add line <Keyword>Qt4VSv1.0</Keyword> between the tags <PropertyGroup Label="Globals"> and </PropertyGroup>.
Right click on your project in "Solution Explorer", click on "Reload Project"
Right click on your project in "Solution Explorer", click on "Convert project to Qt Add-in project"
If you have header files in your project you are going to have to follow the instructions in this answer to trigger the generation of moc_* files in the "Generated Files" folder.
For editions of Visual Studio older than 2010 see this work around.
Here's the response from Nokia support engineer, name removed for privacy protection:
Hi,
Thanks for the suggestion. I have
passed it on to our developers who
will consider implementing it for a
future release. You can track it using
the following link:
https://bugreports.qt.io/browse/QTVSADDINBUG-27
Regards,
Support Engineer, Qt Development Frameworks, Nokia
>
Original question
We have quite a few legacy vcproj projects that we wish to add Qt to it.
Currently, we don't have an easy way to convert these legacy vcproj
files into a Qt-enabled vcproj.
What do I mean by Qt-enabled?
On a non-Qt-enabled vcproj, when I right click on the project name
under Solution Explorer, all options related to Qt are all grayed-out.
It would be really useful if Nokia adds this capability to VSTD Add-in.
Stackoverflow fellows, if you would like to see this feature implemented by Nokia, please help vote for it at the link above! =)
I use Qt VS Tools instead of Qt VS Add-in.
Instructions
In the .vcxproj file, make the following modifications:
Add <Keyword>Qt4VSv1.0</Keyword> into <Project><PropertyGroup Label="Globals"> (in accord with Benjamin's answer).
Add the following element into <Project> (the root element):
<ProjectExtensions>
<VisualStudio>
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_x64="5.6-msvc2013_64" MocOptions="" />
</VisualStudio>
</ProjectExtensions>
Note that the value of the attribute Qt5Version_x0020_x64 should match the name of a Qt version in Qt VS Tools. You may set an arbitrary value and then fix it in Qt Project Settings in Visual Studio.
My setup
Visual Studio 2013
Qt VS Tools 2.0.0 Beta (apparently a rebranding of Qt VS Add-in)
Qt 5.6 msvc2013_64
Notes
When I follow Benjamin's answer and try to "Convert project to Qt VS Tools project", Visual Studio gets stuck.
The only Qt specific functionality I've tried with the project is exporting a .pri file.
I have reverse engineered the necessary modifications from a fresh VS project created using the template Qt GUI Application.
Converting a regular VC project to a QT project should be easier and the error message displayed by the Qt plug-in when attempting to add a Qt class to a non-QT project is exceedingly unhelpful especially when considering the actual differences between a Qt .vcprojfile and a non-Qt one are minimal. It is often the case that you have existing legacy code built into libraries and Dll's. During migration to Qt you may wish to add a Qt class to an existing module which was previously a non-Qt project. If the module has relatively few source files you may find it easier to re-create the project as a Qt project. If it has hundreds of source files or is complex in other ways it is often be easier to simply hand edit the .vcproj file. By comparing a regular .vcproj with a Qt one it is easy to see what the differences are:
A Qt project has a Keyword="Qt4VS1.0" immediately before
TargetFrameWorkVersion line near the top of the file.
At the bottom of the file you need to add the required Globals (in
particular QtVersion.Win32)
You will need to add the locations of the Qt header files to the
include paths (for all build configurations). You can do this later
via the visual studio user interface
For an exe or dll you will also need to add the Qt library locations
and library files to the linker options.
You actually only need to do 1 and 2 in a text editor and then you can reload the project in Visual Studio.
After setting up include paths and libraries you should be able to build the project as usual. Next you can add a new Qt class or convert an existing class into a Qt class. To do the latter first remove the source files for the existing class from the project otherwise the Qt add class wizard is likely to complain.
The above steps are intended for experienced users and you should always back up existing projects .vcproj files bfore hand editing. Simple mistakes here can render the file unusable.
More answer from Qt support engineer; I think the first pargraph is helpful as I didn't know that before:
i think this is a misunderstanding
really. If you have a Qt project
generated with the Add-in, then you
can change this project into a qmake
generated Qt project - and vice versa;
If you have a .vcproj that has been
generated by doing qmake -tp vc, then
you can convert this to a Qt Add-in
project.
There is no functionality to convert a
regular win32 project into a Qt
enabled project, so the suggestion
created is still valid, see:
https://bugreports.qt.io/browse/QTVSADDINBUG-27
I can see from the history of this
report that it has been closed and
re-opened again, so I assume there was
a misunderstanding regarding what you
were looking for in the first place.
If you create a .pro for you project
using qmake, then you should be able
to create a .vcproj file using 'qmake
-tp vc' on that .pro file. The qmake manual is available here:
http://doc.qt.io/qt-5/qmake-manual.html
I hope this helps.
Regards,
--
Support Engineer, Qt Development
Frameworks, Nokia

Qt for windows CE

I have installed Qt for windows CE using this link http://qt.nokia.com/products/platform/qt-for-windows-ce for visual studio8, I can see Qt tab in VS IDE.
I tried to create new application for QT am getting error that
"There are no Qt/CE platforms defined. Please add your Qt/CE build in the Tools/Options/Qt/Builds dialog."
How can i define platform??
As it explains in the error. Go to tools menu, then options submenu. Select Qt from the tree and then select Builds item. There you will see an Add button. Click it. Write the version and path of your installed Qt. Then you are good to go.
Okay, I click Tools, select the "Options…" menu item (it is not a submenu), up comes the "Options" dialogue box, I see no "Qt" entry in the tree. Fresh never-used-before install of Visual Studio 2008 on Windows XP Pro SP3, with Qt add-in installed and I've tried running it as an Administrator too.
Did I miss something?
In the meantime, I have discovered some notes here:
http://www.sereno-labs.com/qt-4-6-2-installation-procedure-friendlyarm-mini-2440-windows-ce-5-0
The device I'm targeting is not a FriendlyARM, rather a Psion hand-held, but nevertheless, suggests that the bare Qt package lacks any VisualStudio binaries.
Further update…
My aging P4 laptop is busily compiling Qt now, has been for some hours. I found that for the Psion, I had to edit the setcepaths.bat script to make the call to checksdk.exe consistent with the SDKs actually provided. Upon doing this, things seem to be working. If you get an error message regarding a missing header, run:
checksdk.exe -list
That'll tell you what your SDK is actually called. You might find then that running:
checksdk.exe -sdk "Your SDK with spaces (and ARCH in brackets)" -script tmp.bat
tmp.bat should produce the needed environment.
Lastly, I hit a compiler error due to some left-over autogenerated files in the Qt build directories. I'll post up the (Cygwin) command I used to clean up the sources mid-build when I find it.

Resources