I am in the process of upgrading from Qt4 to Qt5.
When I compiled the Qt4 sources I used to configure like this:
configure –qtlibinfix _64_
We did this for the x64 build so that the resulting Qt dlls would be renamed QtCore_64_.dll etc...
We are supporting both 64 and 32 bit builds and this made it a lot easier for us.
However, now with Qt5 it seems the -qtlibinfix option is gone. Is there an equivalent? Or another way a similar thing can be accomplished.
I have been scouring the Qt doc, and I have not found anything yet. Any help would be appreciated.
I'm also porting an app from Qt4 to Qt5. -qtlibinfix works for me as expected on Windows, building Qt 5.4.0.
Related
I am trying to cross compile a Qt4 application on Linux for Windows. I need to create an .exe (32 bit) from a Qt project, and I'm compiling under Linux (32 bit). Note that I'm not using Qt Creator, I am compiling with qmake.
I tried following many other tutorials/answers but I can't seem to make it work. Some suggest that I need MinGW but I can't find it for my platform (PCLinuxOS). Does anyone know where I can get it? Is there any other solution (apart from using Wine/Windows)?
I already have a copy of the headers and DLLs from Qt4 for Windows.
MXE does exactly what you want. It cross compiles to Windows. It comes with Qt, as well as many other libraries.
It's much easier to use than setting up a MinGW compiler on your own. You can start building in a matter of minutes, rather than spend the whole day setting up a cross compiler manually.
I have 2 different projects build with MinGW 4.7.2 using CMake and I need to link these to a Qt graphical app. Qt version is 4.7.4. OS is Windows 8 64bits.
The problem is that when I try to compile I get a huge amount of undefined references. After some research, I think it's because my version of Qt use minGW 4.4. Is that correct ?
Is there any way I could make the app work with my current configuration ?
If not, is there a different version of Qt that could work ? From what I saw the only option is to compile Qt with minGW 4.7.2. I tried and got errors when building it so if there's an easier way to make things work it would be great.
I also tried to compile my 2 projects with MinGW 4.4 but it crashs when i execute them so I have to keep MinGW 4.7.2 since I don't plan on doing more modifications to these 2 projects.
Also, as of now I use the mingw from mingw.org on a 64 bits laptop. I haven't got any problem because of that since now but maybe i should change to one of the mingw64 alternative ?
I need to port one of my old program to Windows. The current version uses Qt 3 on Linux.
I'd like to see it within few days only to do some tests.
Instead of porting my code on Qt 4 (no time now), is it possible to recompile on Windows with Qt 3? Do I also need minGW? Which problems may I have doing this porting?
I can't find Qt 3 for windows, can someone give me a link? or I can use the same qt source I use on Linux?
Yes, you can !
Download the qt-win-3.3.x-8 project on Sourceforge.
QT4 still has back-compatible QT3 classes, prefixed with Q3* (see http://qt-project.org/doc/qt-4.8/qt3support.html)
You should be able to compile & run you QT3 app on QT4 via those classes with minimal adaptations.
Qt-3.2 for Windows was also distributed in a CD bundled with the book "C++ GUI programming with Qt3" at no additional cost with a license for non-commercial use.
ISBN: 978-0131240728
The supported compilers were MSVC and Borland. MingW is not mentioned.
Questions:
Is Qt Creator built with Qt Creator?
Similarly, is Qt Designer built with Qt Designer?
BTW, why are there two Qt IDEs? Are they competitors? Which one should I use? I am using Creator.
What is Qt SDK? I am asking this because the Qt Designer & Creator 2.2.1 and Qtmake 4.7.4 that I installed thro ubuntu 11.10 s/w centre does not work. The build menu is all greyed out.
When I downloaded the latest QtSDK (2.3.1/4.7.4) into a separate installation into /opt/QtSDK, both the ubuntu sanctioned installation and the /opt/QtSDK would work as expected.
Why did my ubuntu sanctioned installation not work without the SDK? What does the SDK do?
This one is for Ubuntu enthusiasts - Qt IDE requires the SDK to work, and yet ubuntu released both Creator/Designer without checking if they work first? There is no QtSDK installation item in s/w centre. Is that intentional, or a procedural bug?
After I build my desktop app (I am building a tabbed file explorer) on Linux, what steps do I need to make to have it running on Windows 7/Vista? Will I rebuild on a windows version of Qt Creator?
I also notice that Qt Creator code generation is not perfect. It would forget to include some Qt library files in the auto-generated code, and I had to correct that manually.
Is Qt Creator built with Qt Creator?
I believe so.
That doesn't mean that everyone who works on Qt has to use it - just that I believe that lots of people do.
I don't work for any of the companies that have produced Qt, but my reasoning is:
A Google search for "dogfooding qt creator" brings up plenty of hits, including this comment from November 2010:
We’re also “dogfooding” by releasing complex apps like Qt Creator and the Ovi Suite on the desktop ports of Qt
They've put a massive amount of effort into Qt Creator over the last few years. It's hard to imagine that being worthwhile, unless they used it themselves
At recent Qt Developer Days, Qt Developers have spoken really enthusiastically about Qt Creator
Similarly, is Qt Designer built with Qt Designer?
Yes. A look at the Qt Designer source code shows plenty of .ui (Designer) files.
Why are there two Qt IDEs? Are they competitors? Which one should I use? I am using Creator.
When you edit .ui files insiide Qt Creator, you are still running Qt Designer: it's simply showing the Designer window inside Creator, for convenience.
What is Qt SDK? ... What does the SDK do?
Qt SDK is just a convenient way to download all the Qt tools in one go. You don't have to use it.
This one is for Ubuntu enthusiasts ... Is that intentional, or a procedural bug?
Sorry - no idea. It's hard to imagine it being intentional though.
After I build my desktop app (I am building a tabbed file explorer) on Linux, what steps do I need to make to have it running on Windows 7/Vista? Will I rebuild on a windows version of Qt Creator?
You will need to install Qt on a Windows PC, and then build your source code in it.
You can either do that by using Qt Creator and the Windows compiler it includes (mingw) or you can use another compiler, if you have one, e.g. Visual Studio.
I also notice that Qt Creator code generation is not perfect. It would forget to include some Qt library files in the auto-generated code, and I had to correct that manually.
If you've used any non-Qt classes in arguments to signals and slots, then this answer may help you there.
Since I am very UNHAPPY with Visual Studio (It's just Junk!) I am trying to use Qt Creator, which seems to be the solution for my c++ projects to get easily run in my Mac also.
But I am using OpenCV. So, How do I set libraries in Qt?
(include folder and maybe some libs)
I am trying with this app:
http://www.qt-apps.org/content/show.php/Qt+Opencv+webcam+viewer?content=89995
But getting many errors since Qt does not know where to find the libraries, where should I enter the paths or something?
Help will be very well appreciated.
Ignacio
I think I have answered 2 Qt questions that recoup what you are asking :
The first answer is about OpenCV integration in Qt: OpenCV with other GUI (like Qt or WxWidgets) on Win32 VC++
And the second about using 3rd party libraries in Qt: How do i reference the qjson.dll file from my qt project?
I know that this is an old thread but this answer might help anyone on unix trying to link to OpenCV 2.3.1 +
It is actually quite simple with pkgconfig. All you have to do is in your qmake file *.pro add the following:
unix {
CONFIG += link_pkgconfig
PKGCONFIG += opencv
}
Thats it if you are on a unix based system.
Warning, the answers above are deprecated & misleading. Just set up your project with CMake, just like opencv 2.x itself is. Then you just set CMake to add $OPENCV_LIBS as a library to link to and you're done. In qt creator, file-->open project and open the CMakeLists.txt file, presto.
Don't use qmake or pro files unless you really want a QT gui. Even then, look at the QT samples in opencv 2.2+ first, I think they use cmake to handle the qt interface.
Partial answer to myself:
See qmake project files, declaring other libraries.
But I think I will have to compile OpenCV for Linux as I don't think opencv.framework will work with LIBS.
Is there any variable like FRAMEWORKS?