Advanced search

QtQt/C++ - Tutorial 083. Creating a dynamic library and connecting it to another project

Oct. 9, 2018, 2:16 p.m.

Qt, DLL, dll, Windows, dynamic

The forum raised the question of how to create a dynamic library and correctly connect it to a third-party project. Periodically, such questions arise, so consider one option of creating a dynamic dll for Windows using the standard wizards in Qt Creator.

In this case, the option will not be considered when the project is divided into subprojects, which are compiled as libraries and then connected to the main project. Because it will be the dynamic internal libraries of the project. Let's create exactly the external library, which theoretically could be distributed in the form of binaries.

Create two projects:

  1. QuiLib - this will be an external dynamic library that will contain one dialog box. This dialog box will open in the main project.
  2. WithDynamicLibrary - the project that will be used to connect this dynamic library.

QtQt WinAPI - Lesson 003. How to use windeployqt for collect all DLL?

March 7, 2016, 9:52 a.m.

windows, windeployqt, DLL, WinAPI, Qt

In one of the lessons of the Qt it has already been shown how to collect all the DLL, used in the project for the training program for use on other PCs running Microsoft Windows, and now propose to get acquainted with the utility that comes with Qt. This utility is called windeployqt and is a console application, which usually comes bundled with compiler MinGW or MSVC .

To use windeployqt must run from the console, passing as an argument the path to the compiled executable file. Then windeployqt gather all the necessary libraries in the folder where the executable file is located.

The windeployqt utility located in the bin folder, which in turn is located in the folder of the compiler for Qt. Thus, the path to the folder can be as follows:

  • MinGW - C:\QT\5.5\mingw492_32\bin\windeployqt.exe
  • MSVC - C:\QT\5.5\msvc2013\bin\windeployqt.exe

QtQt WinAPI - Lesson 002. How to make win installer for Qt apllication?

Aug. 16, 2015, 10:32 a.m.

WinAPI, DLL, InnoSetup, Windows, Qt, Инсталлятор

In the previous article we learned how to quickly collect all used in the project DLL-libraries. And now it is time to talk about how to build an installer for OS Windows. For a long time I use quite comfortable opensource tool called InnoSetup, which allows just a few clicks to collect a multilingual installer.

The installer utility is going from a script, you can write to blows, or use a script to create the script. The second embodiment is sufficiently effective and easier.

Build installer

Step one. Running the build script

To run the script, go to the menu and choose to create a new one: File > New or combination of keys Ctrl + N.

Then click on the button Next.

QtQt WinAPI - Lesson 001. How to collect all DLL, which used in Qt project?

Aug. 16, 2015, 9:43 a.m.

WinAPI, DLL, DLL Collector, DLLCollector, Qt

Sooner or later before any Qt-developer gets the necessary migration of your application on other computers, and then there is the problem of the availability of libraries on the target computer that are needed to start and run the application. This is especially noticeable when the application can transfer that must be executed under of Windows. If the Linux OS the necessary Qt libraries are present by default, such as with of Ubuntu, is a Windows and they can not be.

But finding and assembling all the necessary libraries can be difficult for a newcomer, and quite tedious task for an experienced programmer. But here, thanks to the good people there is a solution. This utility DLL Collector . This utility allows you to program depending on which was written in the framework, Qt library and automatically copy data to the specified folder.

As the author writes, the utility searches for dependencies in runtime process. Therefore your program must run through this utility. DLL Collector collects information about all loadable plug-ins used by your program, but it should not be forgotten that the plugins are loaded when you first use them in your program functions. Thus, you need to run your program on its functionality to DLL Collector Found all libraries.

How to become an author?

Contribute to the evolution of the EVILEG community.

Learn how to become a site author.

Learn it

Good day, Dear Users!!!

I am Evgenii Legotckoi, developer of EVILEG. And it is my hobby project, which helps to learn programming another programmers and developers

If the site helped you, and you want also support the development of the site, than you can donate by following ways


Let me recommend you the excellent hosting on which EVILEG is located.

For many years, Timeweb has been proving his stability.

For projects on Django I recommend VDS hosting

View Hosting Timeweb
June 5, 2020, 1:09 p.m.
Artem Kin'ko

C ++ - Test 004. Pointers, Arrays and Loops

  • Result:0points,
  • Rating points-10
June 5, 2020, 2:28 a.m.

Qt - Test 001. Signals and slots

  • Result:0points,
  • Rating points-10
June 3, 2020, 1:56 a.m.

C++ - Тест 003. Условия и циклы

  • Result:35points,
  • Rating points-10
Last comments
June 5, 2020, 10:52 a.m.

Распознавание изображений на Python с помощью TensorFlow и Keras

Огромное спасибо за метериал, по-больше бы подобных статей (с подробным описанием работы и примерами применения) на тему современных технологий. Вопрос поразмышлять. На текущий момент реал…
June 5, 2020, 1:39 a.m.
Evgenij Legotskoj

Qt/C++ - Tutorial 091. How to write a custom delegate controlling the highlighting of a row in a table

По-моему, смысла в этом нет особого. Если делегат будет игнорировать настройки таблицы, то это приведёт ещё к большему непониманию, что вообще происходит, для программиста, который после вас буд…
June 5, 2020, 1:34 a.m.

Qt/C++ - Tutorial 091. How to write a custom delegate controlling the highlighting of a row in a table

Сижу, размышляю: можно ли переписать делегата так, чтобы независимо от настроек строк выделялись строки?
June 5, 2020, 1:31 a.m.
Evgenij Legotskoj

Qt/C++ - Tutorial 091. How to write a custom delegate controlling the highlighting of a row in a table

Понятно. Я не обратил внимания на то, что там было в старом коде по настройкам строк :)
Now discuss on the forum
June 5, 2020, 1:09 p.m.

QPlainTextEdit настройка цвета фона

Вечер добрый. Пытаюсь настроить цвет фона QPlainTextEdit следующим образом: CodeEditor::CodeEditor(QWidget *parent) : QPlainTextEdit(parent){ ... QPalette::ColorRole role = bac…
June 5, 2020, 6:13 a.m.

Фильтр для QtableView sql

Добрый день. Для такой фильтрации необходимо использовать QSortFilterProxyModel. В оффдоках есть хороший пример.
June 4, 2020, 2:46 a.m.
Mihail A

Qt- C++ QTableView подсветить строку

June 3, 2020, 1:49 a.m.

Можно ли сделать в QML таблицу как в Excel?

edi-tableview - нашел пока такое выглядит коряво, посмотрим что можно сделать
June 2, 2020, 2:46 a.m.
Evgenij Legotskoj

Медиа файлы Google Firebase

Картинки можете попробовать сжимать через QPixmap, там есть возможность установки scaleFactor, через него можете устанавливать нужные параметры. А что касается конвертации видео, то лучше п…
© EVILEG 2015-2020
Recommend hosting TIMEWEB