How to export Visual Studio project to Qt? - c++

I wonder how can I export a Visual Studio C++ project to Qt?
I am using openCV and OpenMP so I would like to know about setting these libraries in Qt.

Answer to myself.
Visual Studio is capable to export the current project to a make file so.
File>Export to make file should work.
(I got this info form microsoft msdn site. So, it should work)

Related

Building QT with Visual Studio

I know there have been a few questions before regarding this, but not too much up to date.
I am developing a project with Visual Studio 2015 express edition and I wish to add a GUI to my project via QT.
The latest version of QT (5.8.0) has a VS 2015 version, so I assume it is compiled using Visual Studio instead of MinGw.
Sorry if this is a very noob question. I have no experience with QT, but how do I then integrate my QT project into my VS project, do I build the GUI code first in QT?
If I will create a GUI using the .ui file in QT and then generate the source code for this, can I just copy the source code to my VS Project. I assume I have to configure the project file in VS as how will VS know where to find the dlls and header files for QT? Thanks in advance
You need the VS Tools for Qt. They work with >= Visual Studio 2013 Community Edition.
You can get them here and all information about how to use them.
Qt VS Tools integrate the Qt development tools into Microsoft Visual Studio 2013, and later. This enables developers to use the standard Windows development environment without having to worry about Qt-related build steps or tools.
The main features of Qt VS Tools are:
Wizards for creating new Qt projects and classes.
Automated build setup for the Meta-Object Compiler (moc), User Interface Compiler (uic), and Resource Compiler (rcc).
Import and export of Qt project files (.pro) and project include files (.pri).
*Automated conversion of a Qt VS Tools project to a qmake project, or the other way around.
Integrated Qt resource management.
Integrated Qt documentation.
Debugging extensions for Qt data types.

Installing Opencv with C++ without Visual studio

I want to use opencv with C++.
But i dont want to install Visual studio.
Is there any way i can do that ?
I could not find any proper installation guide for that .
Visual Studio is just an IDE that helps you to develop your project. To use OpenCV library on windows, you have to add the IncludePath, LibraryPath, and link the ddl libs. In fact Visual Studio make all the stuff easier.
There might be another solution by using MingGW compiler, but it is not recommended since you are using Windows and Visual Studio is the better choice.

Qt and opencv in a Visual Studio 2013 Console Application

I'm trying to use Qt and OpenCV in Visual Studio 2013. OpenCV is working fine; however, when I try to link to Qt libraries, I get the error:
OpenCV Error: The function/feature is not implemented (The library is compiled without QT support) in cv::fontQt, file ....
I have installed the Visual Studio Add-in. What else do I need to do to get this working. I've looked on the Internet for how to do this, but most pages I find seem to require using QtCreator, or making a QtProject inside Visual Studio. I need to have a console application in Visual Studio that links to Qt. I am a complete beginner with Qt, and a beginner with C++ and Opencv.
Any help would be appreciated. Thanks.
Make sure that you have included the library folder into the Project Properties->Linker->Additional Library Directories location.

Visual C++ 2010 and Qt (moc etc)

I'm using Visual Studio 2010 Ultimate and I know there's the Qt VS Add-In. However I've chosen to not use it as according to an announcement by Nokia they will not release any further versions of it. So now would be a good time to change work practises.
I'm looking for a way to automatically call moc.exe on class files that need to be moc'ed, and for the moc'ed files to be compiled as well. I'll probably do this for the resource/ui compilers as well.
Qt's plugin simply creates Visual Studio build rules files - these are 'normal' xml files and anything can use them.
There were a series of add-in VS macros before the visual studio plugin became available.
Add-in is mainly useful to import .pro files to VS projects, after that you do not really need the add-in (unless for making it easier to change between different Qt versions).
Just make sure to define QTDIR in a project property page (.vsprops) as UserMacro and have it exported to the environment, then you can use it for $(QTDIR)\bin\moc.exe against Qt header files in the custom build step, similarly for UIs.
<UserMacro
Name="QTDIR"
Value="C:\Qt\4.6.3"
PerformEnvironmentSet="true"
/>

Getting started with CppUnit and Visual Studio 2010

I have searched for answers until I have become crossed-eyed and confused.
I have a Windows XP environment with Visual Studios 2010. I have downloaded and extracted CppUnit 1.12.1 from Sourceforge to C:\CppUnit. I understand I must use Visual Studio to open src/CppUnitLibraries.dsw and Batch Build all of the projects it opens to populate the lib directory with libraries. This is essentially the extent of the CppUnit "installation" process.
However when I try to open CppUnitLibraries.dsw, Visual Studio says the project must be converted to the current Visual C++ project format. If I click "yes" (to convert and open the project), it says the project file cannot be loaded and it asks if I want to remove the unloadable project from the solution, to which I say "No" since I'm certain this is not what I want to have happen. It does this for many projects in the CppUnitLibraries.dsw solution and I'm assuming this is unwanted behavior.
A few of my search results indicated that I should open src\msvc6\testrunner\MsDevCallerListCtrl.cpp, find the line that says...
#import "libid:80cc9f66-e7d8-4ddd-85b6-d9e6cd0e93e2" version("7.0") lcid("0") raw_interfaces_only named_guids"
...and replace the 7.0 with 10.0. But this does not help.
Am I doing something wrong? What must I do to get started with CppUnit? (I'm sorry if this is a very noobish question. I'm stuck, frustrated, and very confused.)
I've successfully converted CPPUNIT 1.12.1 to be a VS2010 solution. It's described here: http://blogs.powersoft.ca/erict/archive/2012/02/21/cppunit-in-vs2010ndashwith-a-sample.aspx and the solution can be downloaded from there.
I believe that the extension .dsw was used by Visual Studio 6 in 1998.
By Visual Studio .NET 2003, they had moved to .sln Solution Files. Although the format has changed somewhat, Visual Studio 2010 still uses 2010 files.
So, if you've downloaded some software that comes with a .dsw file, Visual Studio 2010 will need to convert that file to a .sln to be able to use it.
Each time we've upgraded to a newer version of Visual Studio, at work, over the years, we've had to make some source code changes, for the newer compiler. So I'd say that any C++ code which comes with .dsw file is likely to require some significant effort.
I'd suggest trying to find a newer build or version of CppUnit, or looking for another tool.
This question looks useful.