Tag Archives: Qt

MOC error message when building a small single file Qt program


Just a reminder for myself, because I will certainly stumble over it again in the future: One of my projects was using Qt and was split into several files and subfolders, with several CMakeLists.txt files to it. In it, I made all the required CMake-Qt-Magic, so that CMake and Qt with MOC was working (too… »»»

Building Qt 5.9.1 on Windows 7/10 with Visual Studio 2017

2017-08-18 5 comments

Time again for an follow-up to my post on Qt’s LTS release, now that Qt 5.9 has been published as a new long-term supported (LTS) release. And since Qt 5.9.1 does not build with Visual Studio 2010 anylonger, this was also a good reason to switch to the freshly released Visual Studio 2017 Community Edition.… »»»

Building Qt 5.6.2 on Windows 7 with Visual Studio 2010

2016-11-28 1 comment

This is an update to my previously published post Building Qt 5.2.1 on Windows 7 with Visual Studio 2010. Not much has changed for me: I’m still running Windows 7 (Windows 10 can wait a bit longer) and Visual Studio 2010 (I’ll probably switch to version “2017” when it’s done — and if it still… »»»

No QtTools (lupdate/linguist/lrelease) when built as shared libraries

2015-05-12 1 comment

So I’ve built Qt from source and used it successfully in the last year or so. Some time ago I turned my attention to multilanguage support and learned about Qt’s tools: linguist.exe, lupdate.exe and lrelease.exe. Strangely, those files only existed in the “bin” folder of the statically built version, not when I built them as… »»»

Building Qt for static linking

2015-03-31 1 comment

One of the drawbacks of using such a comprehensive framework as Qt is the massively increased size of you program. When my pet project RandFill was only using the plain Win32-API, it was a single executable file of a couple of hundred kilobytes. Now, using dynamically linked Qt, the whole package (with DLLs, MSVC redistributables,… »»»

Size comparison: RandFill 1.1.0 vs. 1.2.x-devel


As you might know if you’ve read the previous entries, I’m currently migrating RandFill from plain Win32 code to a mix of Win32 and Qt 5 code (mainly the GUI parts, at the moment). It’s still a work-in-progress, but since the basic project builds again, I wanted to check the sizes of the old and… »»»

Plans & Projects #3


Konnichiwa, time for another status report: As mentioned the last time, I extracted the device-handling code of RandFill into a subproject that generates a DLL, but which is still not fully functional. The reason for this is the intertwined structure of the program; although I tried to keep the different parts isolated, I obviously wasn’t… »»»

CMake, Visual Studio and Qt 5 with MOC…

2014-06-15 3 comments

After building a 64-bit version of Qt with/for Microsoft Visual Studio, building a simple Qt test program and doing first steps with the CMake build system the next hurdle appeared on the horizon in the form of support for Qt and its Q_OBJECT features (I am currently fighting more with the changes I made to… »»»

Building a simple Qt application on Windows with Visual Studio

2014-04-12 1 comment

After preparing the Qt framework, I needed to check if everything works; therefore I built a very simple Qt5.2.1 application, the GUI-equivalent of a “Hello-World” program. Building the sample application Open “Visual Studio 2010” and create a new, blank project: File → New → Project… Visual C++ → General → Empty Project Add a source… »»»

Building Qt 5.2.1 on Windows 7 with Visual Studio 2010

2014-04-12 5 comments

For my first steps with Qt, I wanted to use the 64-bit libraries of Qt 5.2.1 on Windows 7 with Visual Studio 2010; unfortunately the project doesn’t offer a binary package download for this combination, so I had to build the framework myself. After some failures at this (mostly due to out of date tutorials… »»»