Privacy policyContactsAbout siteOpinionsGitHubDonate
© EVILEG 2015-2018
Recommend hosting
Aug. 16, 2015, 2:43 p.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.

Aug. 15, 2015, 4:31 p.m.


QSqlRelationalTableModel, QSqlRelationalTableModel example, qt, qt таблицы, sql, sqlite

In Qt to represent table fields, which involve foreign keys to other tables database, QSqlRelationalTableModel can be used, which is a more advanced version QSqlTableModel class, which was considered in the previous article .

This class allows you to set relationships between tables and substitute values in the representation of the table formed by the values of the connected tables.

This article discusses the option of two tables. One table contains information about the devices (host name and IP address), and the second table ID of the device, which in the second table to be substituted host name and IP address of the device, respectively.

Project Structure for QSqlRelationalTableModel

Структура проекта

The project for this tutorial is a modified version of the preceding Article and remains unchanged.

Aug. 14, 2015, 5:44 p.m.


database, QSqlTableModel, QSqlTableModel example, qt, qt таблицы, sql, sqlite

In order to present the information in a database table we can to use the following classes:

  • QSqlQueryModel - model that generates a table by defining the raw SQL-query. It may be useful in the formation of a special custom filters and compile information from various database tables. About it in more detail in later lessons.
  • QSqlTableModel - the subject of our discussion in this article. The model that generates the table from database using name of table. But we can to create table without information from other tables.
  • QSqlRelationalTableModel - a class that allows you to create a table with constraints from other tables, substituting the values of the table, which is the model on contained in other tables record ID.

For comfortable work with information that is placed in the database applied additional class, which partially constitutes a "facade" design pattern.

Project structure for QSqlTableModel

he project is created as an application Qt Widgets, and it contains the following files:

  • - project profile;
  • mainwindow.h - header file of mainwindow;
  • mainwindow.cpp - source file of mainwindow;
  • main.cpp - file with main function;
  • mainwindow.ui - interface of mainwindow;
  • database.h - header file of helper class to be used for information that is placed in a database;
  • database.cpp - source file of helper class to be used for information that is placed in a database;
Aug. 13, 2015, 5:29 p.m.


QSettings, QSettings example, QSettings пример, qt, Настройки, сохранение настроек

Saving application settings - this is one of the first things that beginners learn when working with the Qt framework. For this purpose QSettings class that allows you to save the settings or operating system registry or a text file. In this tutorial you will use the easiest option - it is saving the settings in the operating system registry. In order to ensure the visibility of the store the settings in this tutorial use the draft of the lesson QSystemTrayIcon .

Project structure

The project is created as an application Qt Widgets, where files are created by default:

  • mainwindow.h - header file of the main application window;
  • mainwindow.cpp - source window;
  • main.cpp - the main source file from which the application starts;
  • mainwindow.ui - form of the main application window.
Aug. 12, 2015, 4:27 p.m.


QSystemTrayIcon, Tray, qt, трей

Similar article on PyQt5/Python

Today will discuss the way to turn off the application, the Qt framework, written in, the operating system tray using QSystemTrayIcon class. This function is very useful for applications that need to run in the background for a long time mode. For example, video or audio playback application.

Therefore we will work with following questions:

  • How to teach your program minimized to tray;
  • How to make a popup menu for the tray icon of your applications;
  • How to disable this feature if it is not needed.
Aug. 11, 2015, 4:12 p.m.

Data Transmission Technologies

DELL, vlan, voice vlan

Configuring VLAN for DELL switches (depending on the version of the OS switch syntax may vary slightly.

Before you configure the VLAN on the switch interfaces, you must make the switch in the VLAN database and create a VLAN interface:

console(config)# vlan database
console(config-vlan)# vlan 1972
console(config-vlan)# end
console(config)# interface vlan 1972
console(config-if)# name Marketing
console(config-if)# end
Aug. 10, 2015, 3:59 p.m.

Data Transmission Technologies


Campus Switching Architecture

Dell switches networking N-series are based on a modern architecture of campus networks

  1. Support loop redundancy without the use of STP by using MLAG protocol to create increased access to resources and high bandwidth.
  2. Smooth interoperability with existing infrastructure for greater compatibility and integration.
  3. Combining a variety of network products with the latest open standards protocol for more choice in network.

Campus architecture on Dell switches based on functional MLAG protocol launched in version 6.1 operating system, Dell Switches. In this architecture, the two switches N4064F as peers aggregate access switches, which are combined in two stacks as well as peers. Each stack switch maintains a portion of one floor in the building of the campus, which is aggregated with two 10Gbit / c uplink'ami. N4064F aggregation layer switches easily support up to 24 stacks of switches. This architecture provides improved bandwidth, overcoming limitations STP to block redundant ports. Network is designed with a high redundancy in terms of link failure and switches.

Aug. 10, 2015, 4 a.m.


ip address, ip адрес, lineedit, qlineedit, QLineEdit example, QLineEdit IP Address, qt, qtcreator

Available similar articles in Qt/QML and PyQt5/Python

When you will develop network applications, you may need to create form for input ip-address, but the use of a simple method setInputMask ( "; _"); of QLineEdit does not provide the proper result as this mask allows to enter the values of 999, 657, etc., while the IP-address of the limited number of 255.

One way to solve this problem is to use Validator .

Aug. 9, 2015, 3:52 p.m.

Data Transmission Technologies


For example, DELL PowerConnect 3524

You can control the device directly via the terminal port or via a Telnet connection. If access is via a Telnet connection, ensure that the device specific IP-address, which will be used by the workstation to access the device and connect the device to use the CLI commands.

Telnet is an emulation on a TCP / IP terminal. RS-232 terminals can be virtually connected to the local device through a TCP / IP network protocol. Telnet is an alternative to the local terminal where you want the remote control of the device. The Switch supports up to 4 Telnet sessions to manage. All CLI commands can be used over a telnet session.

Aug. 8, 2015, 8:49 a.m.

Data Transmission Technologies


Compensation of frequency synchronization error

The pointer can not only fulfill a fixed phase shift and mismatch clock multiplexer clocked device, from which the user data is received. To compensate for this effect, the index value is periodically incremented or decremented.

Positive alignment - The pointer is incremented by one, reflecting the delay start of the next container VC-4, three bytes.

Negative alignment - to accommodate the "extra" bytes used three younger byte pointer, ie the NT box (the pointer itself fits in fields H1 and H2)

Jan. 17, 2019, 11:51 a.m.

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

  • Result:20points,
  • Rating points-10
Jan. 17, 2019, 11:49 a.m.

C++ - Test 002. Constants

  • Result:50points,
  • Rating points-4
Jan. 17, 2019, 11:13 a.m.

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

  • Result:28points,
  • Rating points-10
Last comments
Jan. 16, 2019, 8:06 a.m.

Заработало. Забыл model->select(); вписать.
Jan. 16, 2019, 8:02 a.m.

Всё равно пусто, хотя строка с данными в базу добавляется.
Jan. 16, 2019, 7:51 a.m.
Евгений Легоцкой

потому, что нужно сохранять информацию для всех остальных ролей и столбцов через вызов переопределённого метода. Да к тому же вы ещё и зациклили вызов метода data. QVariant MySqlTableModel:...
Jan. 16, 2019, 7:43 a.m.

Сделал вот так. В tableView ничего нет, кроме заголовка. QVariant MySqlTableModel::data(const QModelIndex &index, int role) const{ if (role == Qt::DisplayRole) { QTime ...
Now discuss on the forum
Jan. 18, 2019, 11:26 a.m.

Для Desktop делал так: void pause(int ms){ QTimer timer; timer.setInterval( qBound(1, ms, 3600000) ); timer.setSingleShot(true); QEventLoop loop; QObject::connect(&...
Jan. 17, 2019, 12:01 p.m.
Алексей Внуков

у меня просто есть отдельное поле с чекбоксамими какие колонки нужно отображать CheckBox { id: checkBox text: qsTr("some text") checked: true onC...
Jan. 15, 2019, 4:53 p.m.

Спасибо, заработало.Но выдало обычный текст без форатирования HTML.Придется искать дальше
Jan. 15, 2019, 12:52 p.m.

Я же вам выше написал CLion умеет работать с ремоут машинами. И Qt так же собирает.
Join us in social networks

For registered users on the site there is a minimum amount of advertising