How to build the QSerialPort module using Qt5 (Windows 7)

Although the essential is explained here, i will write a short version of “how to build the QSerialPort module on Windows 7”  (this seem to be changing very fast).

This module allows easy access to comunication between devices using a serial port.

I will assume tha Qt 5 is installed according to this description:

#1 – Get the source code

Access the following URI: and search for the download link or click  here.

Note that, in my case, the download was made to this folder C:\Users\Admin\Transferências.

#2 – Create a file structure for building

In the download folder, create a build folder named qt-qtserialport-build, in order not to change the content of the sources.

After that, we have something like this:


#3 – Build the module

After opening  the console (run cmd.exe as administrator) go to the qt-qtserialport-build directory.

Then, once again, as administrator, type:

qmake ../qt-qtserialport/


mingw32-make install

Note: You must have perl installed.


If this error happens, try downloading a 32 bits version, install it and reboot. Then, try the same steps.
Download Strawberry Perl (32bit)

#4 – Test with a small example

You can use this one:  QSerialPort – Como identificar um dispositivo de comunicação série

Deixe uma Resposta

Preencha os seus detalhes abaixo ou clique num ícone para iniciar sessão:

Logótipo da

Está a comentar usando a sua conta Terminar Sessão / Alterar )

Imagem do Twitter

Está a comentar usando a sua conta Twitter Terminar Sessão / Alterar )

Facebook photo

Está a comentar usando a sua conta Facebook Terminar Sessão / Alterar )

Google+ photo

Está a comentar usando a sua conta Google+ Terminar Sessão / Alterar )

Connecting to %s