Evgenij LegotskojSept. 12, 2015, 12:12 p.m.

QtQt/C++ - Lesson 017. QGraphicsScene – How to work with graphics in Qt

QGraphicsScene, QGraphicsScene пример, Qt, QGraphicsScene Qt5, QGraphicsScene example

From this article we begin to explore the Qt graphic libraries, to be exact, QGraphicsScene. This class provides the functionality to manage a large number of 2D objects. QGraphicsScene set to QGraphicsView.

We describe the features that need to be implemented in our application:

  • Adding a graphic scene in QGraphicsView.
  • Rendering the graphics objects on the two stage via lines, namely a rectangle and a square.
  • Dynamic resizing of graphic scenes, depending on changes QGraphicsView sizes.
  • Dynamically changing objects on the graphic scene, depending on the size of the graphic scene.

Project Structure for QGraphicsScene

Project Structure for QGraphicsScene

By the project structure "Default" added another class MyGraphicView .

The fact is that for the convenience of working with QGraphicsScene it was decided to create a class that inherits from QGraphicsView already inside to operate graphical scene and its objects.

Evgenij LegotskojSept. 11, 2015, 6 a.m.

Fiber Optic Transmission LinesFOTL - Tutorial 011. The operating principle of OTDR

fiber, волс, OTDR, рефлектометр

Pulse reflectometers OTDR (Optical Time Domain Reflectometer) operate on a similar principle, which is used in reflectometers for testing electrical cables. Reflectometer submits a powerful light pulse into the optical fiber, as well as an electrical reflectometer submits powerful probe pulse in the electrical cable. At the same time it carried out the measurement of power and pulse delay time that is returned back to the OTDR. The difference between the electric OTDR is that the metallic conductor returns only pulses that are reflected by strong inhomogeneities in the cable, that is, from the location of cable deformation, while the optical fiber return pulses are not only places of large irregularities, but also due to the Rayleigh effect scattering. Rayleigh scattering occurs due to changes in the refractive index of the optical fiber when it is stretched during manufacture. Such inhomogeneities arising in the manufacture of the optical fiber is extremely small, but have some effect on the scattering of the light beam that is scattered by these irregularities in all directions, including back to the OTDR.

Passage of the light beam from the optical fiber OTDR
Evgenij LegotskojSept. 9, 2015, 5:07 a.m.

Data Transmission TechnologiesToken Ring and FDDI technologies

FDDI, Token Ring, токен

Token Ring and FDDI technologies have significantly more complex implementation than the same Ethernet technology on a shared data environment. Much of this complexity was due to the fact that the developers have tried to improve the effectiveness of the technology: to increase fault tolerance, make the environment predictable design priority service specific data packets, such as voice traffic, which is sensitive to delays. In this they succeeded, for example, a more advanced version of Token Ring, FDDI namely for a long time been used as a campus backbone networks of enterprises.

Evgenij LegotskojSept. 8, 2015, 4:59 a.m.

Data Transmission TechnologiesFeatures of the SDH line of microwave systems

SDH, STM-RR, радиорелейная система, РРЛ

SDH technology is not limited to use as a transmission medium, only the fiber-optic cable (FOC). Also, widespread use of radio for the organization of radio relay line SDH networks. Relay channels have great promise for replacing relay RDN systems, the possibility of more effective interaction with the existing SDH systems, optimization of networks SDH circuits in the complex for laying FOC areas of organization of alternative SDH signal transduction pathways and backup of the existing fiber-optic SDH lines.

Manufacturers MRR


  1. Microwave radio relay system SDH «96xx», which includes the following modifications:
    1. LH - system level STM-1 with long inter-station sections;
    2. UH - system level STM-1 for use in an urban environment;
    3. LM - system level OC-1 for use with the access networks;
    4. UM - system level OC-1 for use in urban environments.
  2. The transport relay system "9667 TH» STM-1 level;

ECI: radio-relay systems SDH «SDH-Radio» level STM-1 and STM-4;

NEC: SDH radio relay signaling system level STM-1 signals or PDH E4.

Evgenij LegotskojSept. 7, 2015, 5:26 a.m.

Data Transmission TechnologiesСети OTN - Optical Transport Network

dwdm, OTN, стек протоколов

DWDM networks are not initially digital networks because they provide users with only a few spectral channels, which are only data transmission medium. Also originally DWDM multiplexers perform SDH multiplexer functionality, in consequence of which inherited a number of shortcomings that became apparent with increasing data rates.

Optical Transport Network (OTN)

Disadvantages DWDM systems inherited from SDH systems:

  • Insufficient effectiveness of FEC codes, taken as SDH standard. This prevents further increase the spectral density of channels in DWDM multiplexers.
  • Too "small" switching units for backbone networks operating at speeds of 10 and 40 Gb / s. Even the maximum size of the containers VC-4 (140 Mbit / s) are large enough for the unit of STM-multiplexer 256, which must commute up to 256 containers for each of its ports.
  • Not taken into account peculiarities of different types of traffic. SDH technology developers took into account only the voice traffic.

To overcome these drawbacks, a new technology aimed optical transport networks (Optical Transport Network, OTN)

Evgenij LegotskojSept. 6, 2015, 5:54 a.m.

Fiber Optic Transmission LinesFOTL - Tutorial 010. Measurement of losses by optical testers

fiber, волс, измерения, оптический тестер

There are two methods of measuring the loss in the optical fibers which, in accordance with G. 651 and G. 652, is considered the reference - fiber breakup method and the method of insertion loss. The loss measurements are made by means of optical testers. In the method of fiber breakup P1 measured power (in dBm), passed through the fiber. The fiber breaks off at a distance of about two meters away from the injection point and measured radiation power P2 (dBm), passed through a short section of the remaining fiber. The value of loss in the fiber is determined as the difference between A (dB) = P1 (dBm) - P2 (dBm)

Measurement of losses by the breakup of fiber
Evgenij LegotskojSept. 5, 2015, 12:43 p.m.

Data Transmission TechnologiesDELL Networking. Basics Routing Policy (Part 3)

DELL, Route-Map

VLAN Traffic Redirection

Passing traffic without PBR

Example. Comparison of packets from one VLAN, then routing the output of another VLAN to their destination.

Remote server X, Y, Z hourly cached on the local server A, B, C. Members VLAN 10 use locally cached server 99% of the time, but occasionally need access to current data from the server X, Y, Z, which are located in another city . Traffic on the road between the local and remote servers are often higher than 100% of the bandwidth. To minimize delays in traffic between VLAN 10 user stations and remote servers are configured PBR to avoid bottlenecks.

Evgenij LegotskojSept. 4, 2015, 11:54 a.m.

QtQt/C++ - Lesson 016. How to set QCheckBox in the cell center in QTableWidget?

qcheckbox, qcheckbox center, Qt, QTableWidget

One of the first problems in working with The QTableWidget , which are trying to solve, start to work with this widget - setting QCheckBox in the middle of the cell. The fact that the standard check box in QTableWidget checkbox attached to the left edge of the cell, while the right side is given for explanatory text. But the text may not be, but the area still remains. But at the same time it allows you to set QTableWidget in his cell widgets, which we use to solve this problem.

This article is an extension of a previous article on working with QTableWidget , therefore, to see the full code of the project I encourage you also to the article. This article provides only the code necessary to solve the problem.

Project Structure for QCheckBox center

Project structure remains the same as in the previous article .


The form for the application window QCheckBox

In the main application will be placed:

  • QTableWidget
  • QLable
Evgenij LegotskojSept. 4, 2015, 11:30 a.m.

QtQt/C++ - Lesson 015. QTableWidget – How to create a table with checkboxes?

Qt Таблица, QTableWidget example, QTableWidget пример, Qt, QTableWidget

Using QTableWidget will be the first in a manner that will advise you to create tables with checkboxes on Qt. So let's look at this option and work with tables in Qt and certainly applicable checkboxes.

So, the lesson to be more close to reality, grabbed some code from lesson QDataWidgetMapper . Namely, take a class to work with the database, so they'd just do a table from the database. After that, make the shape of the main application window and output data from the table with the mapping checkboxes. Naturally, when the application database table is created and populated by several records, which we will display in the widget.

Evgenij LegotskojSept. 3, 2015, 5:19 a.m.

Data Transmission TechnologiesEthernet over SDH


Ethernet and SDH technologies are focused on computer and information networks. But the main problem in their interaction is pairing constant fixed speed SDH channels with pulsating Ethernet traffic. For example, VC-4 has a speed of 149.760 Mb / s, while Ethernet 100Base-T has a speed of 100 Mbit / s, respectively. Thus SDH payload channel is 70%, whereas the payload transmission GigabitEthernet generally drops to 40%. To solve these problems using technology GFP, VCAT and LCAS. In fact, these procedures have formed SDH network of the New Generation (NG SDH). Many network operators are given the opportunity to upgrade their networks instead of complete replacement of existing equipment.


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

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

  • Result:10points,
  • Rating points-10
  • knobu
  • Sept. 23, 2020, 2:34 a.m.

C++ - Test 006. Enumerations

  • Result:60points,
  • Rating points-1
  • knobu
  • Sept. 23, 2020, 2:21 a.m.

C++ - Test 005. Structures and Classes

  • Result:91points,
  • Rating points8
Last comments

Qt/C++ - Lesson 015. QTableWidget – How to create a table with checkboxes?

Кто-нибудь знает, как сделать так, чтобы в QTableWidget состоящей из чекбоксов в строке таблицы можно было выбрать только один checkbox ?

Qt/C++ - Lesson 006. QSqlQueryModel – Tables in Qt with SQL-query

QSqlTableModel выполняет ряд стандартных операций для одной таблицы из базы данных. Поэтому там и реализован функционал по удалению и редактированию. QSqlQueryModel позволяет выполнить запр…

Qt/C++ - Lesson 006. QSqlQueryModel – Tables in Qt with SQL-query

Добрый день. Хотел спросить вот что. Создал проект на основе QAbstractTableModel. В MainWindow cоответственно создал модель и связал с представлением. Поиск веду по списку элементов модели,…

QCheckBox в качестве делегата QTableView

До тех пор, пока у вас проект содержит только одну таблицу, или несколько то может быть. Когда их будет 1000 и чекбоксы в разных колонках, то без делегатов и переопределения возвращаемых ре…
  • Damir
  • Sept. 20, 2020, 3:34 p.m.

QCheckBox в качестве делегата QTableView

bool Node::setData(const QModelIndex& index, const QVariant& value, int role){ switch (index.column()) { case 0: switch (role) { case Qt::CheckStateRole:// <- т…
Now discuss on the forum

Как в QTableWidget, состоящей из чекбоксов, в строке таблицы можно было выбрать только один checkbox ?

Сделал таблицу состоящую из чекбоксов по уроку https://evileg.com/ru/post/78/ Кто-нибудь знает, как сделать так, чтобы в QTableWidget состоящей из чекбоксов в строке таблицы можно …

как скрыть елемент с копии виджета

Удалить пост нельзя... Поэтому удачки, Катту)

Тесты падают при сборке под MinGW.

Всем привет! При сборке под MinGW некоторые тесты при старте выдают FATAL "не удалось запустить тест проекта" и подвешивают Qt Creator - приходится его перезапускать. При сборке под MSVC та…

Как в qml работать с динамически созданными потомками?

Спасибо) В Qt/С++ есть функция deleteLater, которую обычно используют, чтобы удалить объекты, которые наследованы от QObject . Она добавлена для того, чтобы не удалять такие…

Как в Qt в qmenu добавить scrollarea

Вот это наследованный класс меню. Но посути это обычное меню. #pragma once#include <QtWidgets>class TransMenu : public QMenu { Q_OBJECTpublic: TransMenu(QWidget* parent = …
© EVILEG 2015-2020
Recommend hosting TIMEWEB