Aug. 18, 2015, 11:20 a.m.

Data Transmission Technologies

MSTP, RSTP, STP

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

Before making STP setting on the switch port, you must set a global preference protocol:

console(config)# spanning-tree 
console(config)# spanning-tree mode rstp 
console(config)# spanning-tree priority 12288 
console(config)# spanning-tree hello-time 5 
console(config)# spanning-tree max-age 12 
console(config)# spanning-tree forward-time 25 
console(config)# exit

In this case, the adjusted version of the protocol, switch priority in the construction of the tree, while promoting the package, the duration of sending hello packet. Once made global protocol setting, make the setting Protocol on the switch ports that will participate in the construction of the tree topology.

Aug. 17, 2015, 1:55 a.m.

Qt

QSqlQueryModel, qsqlquerymodel example, qt, qt таблицы, query

Using QSqlQueryModel to form tables in Qt is the most hardcore version with the lowest level of abstraction than the use QSqlTableModel or QSqlRelationalTableModel . But with all this, and the most flexible option, which requires a deeper knowledge of the language of SQL-queries. In a previous article , two tables were constructed:

  • The main, which were columns Дата, Время, Имя Хоста, IP-адрес.
  • Table devices , which were columns Имя Хоста and IP-адрес.

In the main table in the columns of the host name and IP-address points ID-devices, which carried out a substitution of data from the device tables. In this paper, the structure of the first table and therefore the table will look different:

  • The main, which were columns Дата, Время, ID устройства.
  • Table devices , which were columns Имя Хоста and IP-адрес.

The Generating of the main table in the Application will be SQL-query and the table will be a column respectively Дата, Время, Имя Хоста and IP-адрес.

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

Qt

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.

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

Qt

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, 11:31 a.m.

Qt

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, 12:44 p.m.

Qt

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:

  • DataBase.pro - 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, 12:29 p.m.

Qt

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:

  • Settings.pro
  • 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, 11:27 a.m.

Qt

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, 11:12 a.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, 10:59 a.m.

Data Transmission Technologies

DELL, LACP, MLAG

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.

Donate

Hello, Dear Users of EVILEG!!!

If the site helped you, then support the development of the site financially, please.

You can do it by following ways:

Thank you, Evgenii Legotckoi

VL
Jan. 20, 2020, 11:42 a.m.
Vova Lebedev

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

  • Result:60points,
  • Rating points-1
VL
Jan. 20, 2020, 11:33 a.m.
Vova Lebedev

C++ - Test 001. The first program and data types

  • Result:80points,
  • Rating points4
AP
Jan. 20, 2020, 4:48 a.m.
Anastassiya Polyakova

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

  • Result:57points,
  • Rating points-2
Last comments
Jan. 17, 2020, 1:31 a.m.
Andrej Jankovich

Выглядит как ошибка библиотеки. Расскажите подробно на какой платформе вы собираете проект (MinGW или MSVC) их версии и версии Qt.
D
Jan. 16, 2020, 11:06 a.m.
DENIZ1819

Доброго времени суток, не подскажите, что делать в данной ситуации, после того, как я сделал все вышеуказанные инструкции для подключения библиотеки к проекту?
Jan. 14, 2020, 4:33 a.m.
Evgenij Legotskoj

Рекомендую Wt, достаточно мощная вещь. Этот фреймворк может использоваться для написания сайтов на C++, либо можно использовать только отдельный компоненты, например только ORM. Но я не знаю, ка…
a
Jan. 14, 2020, 4:29 a.m.
ayb

Спасибо за инфу. Поиск качественной ORM привел меня только к sqlite_orm, но не подходит из-за необходимости полноценной поддержки c++14. Про framework Wt не слышал, спасибо за наводку.
Jan. 14, 2020, 1:50 a.m.
Evgenij Legotskoj

Вы заблуждаетесь. Любая нормальная ORM позволяет выполнение сырых SQL запросов. А если хорошо разобраться в работе моделей данных в Qt, то не составит труда использовать ORM вместе с Qt, ту же с…
Now discuss on the forum
Jan. 20, 2020, 4:06 p.m.
Aleksej Vnukov

возможно,но все что я увидел по этому поводу - так это работать с этим адресом, но старые решения на данный момент не работают
VZ
Jan. 20, 2020, 1:37 p.m.
Vladimir Zhitkovsky

Еще не очевидное поведение оказалось, что сигнал onVisibleChanged родительского элемента может вызваться раньше, чем вызовуться onCompleted дочерних компонентов.. как мне очень странно. А вот на…
Jan. 20, 2020, 12:49 p.m.
Evgenij Legotskoj

Добрый день, Касательно удаления строк. Любой QTableView класс, или наследованый от него имеет метод selectionModel() , который возвращает QItemSelectionModel . А эта…
Jan. 20, 2020, 12:35 p.m.
Evgenij Legotskoj

Добрый день. В Qt по сути используется MV шаблон проектирования. Поскольку контроллер и представление объединены в представлении. Так что да, вы понимаете правильно суть Qt. Насчёт тормозов…
m
Jan. 20, 2020, 10:14 a.m.
mihamuz

Совершенно верно. Только увидел Ваше сообщение:)
EVILEG
About
Services
© EVILEG 2015-2019
Recommend hosting TIMEWEB