Реклама

QSignalMapper VS lambda functions

QSignalMapper is a wonderful class to organize the work of the signals and slots dynamically created objects. For example, the dynamically created buttons or objects in QStackedWidget. This was particularly true in older versions of the software, that is, and relied on Qt 4.8, which signals and slots system was based on the use of…

Reading data from a CSV file, and their representation via QStandardItemModel

CSV data format (Comma-Separated Values) format is the simplest representation of tabular data. This format is supported by Excel and many other office suites. For example, I often encounter this format when uploading statistics do the site of the panel webmasters Google Search Console. In this format, the table represents the data sequence, separated by…
Advertisement

Building IBASE SQL driver Qt 5.7 on openSUSE Leap 42.1

Installing Qt 5.7 on openSUSE Leap 42.1 Download the latest version of Qt in Linux: Making the file executable Install gcc, make, and other necessary libraries: Next, install the Qt: Follow the instructions of the graphical installer. Do not forget to select the item of the Source code libraries. Building IBASE SQL driver To build the driver must be installed firebird…

(Русский) QtIFW – Автоматизация WinDeployQt и сборки инсталляторов с Qt Installer Framework

Sorry, this entry is only available in Russian. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language. Правильный программист – это ленивый программист. Если есть возможность что-то автоматизировать, то обязательно нужно это сделать. Например, можно сделать автоматическое выполнение windeployqt…

Connecting the Boost library in Qt for MinGW and MSVC compilers

Initial acquaintance with Boost on Windows start to build precompiled libraries and connecting them to the project on Qt. This code will use one of the Hello World-s from the Boost documentation, namely the installation locale using boost. Building Boost for MinGW First, download the latest version of Boost (as of this writing is version 1.61) and…

(Русский) QMediaPlayer – Аудио плеер на Qt

Sorry, this entry is only available in Russian. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language. Предлагаю написать простенький аудио плеер для mp3 файлов с использованием Qt/C++, который будет иметь плейлист, возможность запуска/паузы/остановки треков, а также пролистывания треков.…

SetWindowsHookEx – Logging mouse events via WinAPI

Functional WinAPI allows by using hooks to monitor system events, such as mouse movement and clicks. This functionality based on callback functions, so if you want to use the Qt system of signaling and slots, you will need to pass one of the methods as a callback to a function for registering callback on a Windows…

Logging Qt application events to a text file

All developers uses macro qDebug(), when debugging an application written in the Qt, but there are also macros qInfo(), qWarning(), qCritical() and qFatal() (which, as of this writing has errors and did not work). With these events, you can divide errors in the application on the level of significance and use filters. To redirect error…

QTranslator – dynamic translation of multilingual application to Qt

Sooner or later, the developer of Qt applications meets the need multilanguage support of  his application. Then you can to use QTranslator class and Qt Linguist for creating of translations. QTranslator object class is used to load translation from a special file with the extension .qm, which is a hexadecimal file of translations. This file is compiled from…