Sept. 4, 2015, 11:54 a.m.

Qt

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 .

mainwindow.ui

The form for the application window QCheckBox

In the main application will be placed:

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

Qt

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.

Sept. 3, 2015, 5:19 a.m.

Data Transmission Technologies

Ethernet, GFP, LCAS, NG SDH, SDH, VCAT

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.

Sept. 2, 2015, 12:38 p.m.

Data Transmission Technologies

DELL, Route-Map

Server Priority

DELL Networking - Server Priority

In this example, the database server should be provided more bandwidth at a specific time to access the storage server.

Configuring VLAN interface on 1G

console#config 
console(config)#vlan 10 
console(config-vlan10)#exit 
console(config)#interface vlan 10 
console(config-if-vlan10)#ip address 192.151.3.5 255.255.255.0 
console(config-if-vlan10)#exit 
console(config)#interface gi1/0/1 
console(config-if-Gi1/0/1)#switchport trunk allowed vlan 10 
console(config-if-Gi1/0/1)#switchport mode trunk 
console(config-if-Gi1/0/1)#exit 
Sept. 1, 2015, 11 a.m.

Qt

QPushButton, Dynamic widget, Динамический виджет, Qt

In complex projects may not be enough to have a static widget in the interface as the incoming information can change every second. Therefore the question on creation of dynamic widgets, such as the layout Qt buttons.

This tutorial describes how to dynamically create QPushButton buttons, receiving signals from these buttons, and the subsequent removal of these buttons from the layout Qt.

Project Structure

Description of the Project:

  • DynamicButtons.pro - profile;
  • mainwindow.h - header file of the main application window;
  • mainwindow.cpp - source of window;
  • main.cpp - the main source file from which the application starts;
  • mainwindow.ui - form of the main application window;
  • qdynamicbutton.h - header file of the wrapper class, which simplifies the process of working with dynamic objects in this lesson;
  • qdynamicbutton.cpp - source file wrapper class that simplifies the process of working with dynamic objects in this lesson.
Aug. 31, 2015, 9 p.m.

AVR

AVR, macro, Assembler

Macro - a set of commands and instructions that are grouped together into a single command to automate programming tasks, speed up frequently performed editing and formatting actions.

Macros can also be used to accelerate software development for microcontrollers on Assembler programming language. During compilation macros are replaced by a sequence of commands microcontroller. Such an approach to programming facilitates the perception of the program code, reduce the size of the source, as well as to bring the programming in Assembler in appearance to the programming language C.

Aug. 31, 2015, 10:39 a.m.

Qt

QMenu, QMenu example, QMenu Qt, Qt, контекстное меню, меню

To use the context menu in Qt is used QMenu class. When performing actions that should cause the menu handler is called, which creates the menu and binds handlers to act in this menu.

In this lesson, work with the shortcut menu will be shown in the example code from the tutorial on working with QDataWidgetMapper. In this lesson, the two files from the previous lesson will be modified, but the project will not work if you do not include it as in the previous lesson files that can not be edited.

Project structure for QMenu

Project structure remains the same as in the tutorial, which is based on the lesson. Changes in the code will be subjected to only two files:

  • mainwindow.h
  • mainwindow.cpp
Aug. 30, 2015, 10:33 a.m.

Qt

QShortcut, QShortcut example, Qt

Even in the official documentation on the topic QShortcut written not so much, so it's probably a note not to forget, not a full-fledged article. Just a few words about how to connect QShortcut entity that will be responsible for processing pressing a hotkey or keyboard shortcuts, such as Ctrl + D .

Project structure for QShortcut

The project structure is so trivial that I will not even bring it in this article. I shall confine myself to only those words that we will work with two files:

  • mainwindow.h
  • mainwindow.cpp

And even mainwindow.ui file will not touch this project. As it will be created by default, so it and leave.

Aug. 30, 2015, 3:40 a.m.

Qt

QSqlRelationalTableModel, QSqlTableModel, QSqlTableModel example, фильтр

Continuing to work with tables to Qt, we would like to spent the time, how to install the filter on the model of data representation in QSqlTableModel or QSqlRelationalTableModel . Therefore, the program code of the tutorial on QSqlTableModel was taken to describe the installation of the filter as a basis for the process.

The code was written in QtCreator 3.3.1 based on Qt 5.4.1.

Project structure

In this lesson, the project structure is similar to the project of the lesson QSqlTableModel.

mainwindow.ui

Add the additional object in the main window of the application, namely, to add the following elements:

  • dateEditFROM - start date;
  • dateEditTO - end date;
  • timeEditFROM - start time;
  • timeEditTO - end time;
  • pushButton - button, by pressing which the filter will be applied.

Aug. 28, 2015, 9:34 a.m.

Qt

Qt, QXmlStreamReader, QXmlStreamWriter, XML, xml example

Qt development tools include functionality for working with XML files, which allows you to create XML files and read them, which may be useful to create the automatic creation of XML markup software, configuration files, using XML, or for parsing XML-files .

To record in an XML file format used QXmlStreamWriter class, while the other is used QXmlStreamReader class to read an XML file.

The project structure for working with XML file

This project uses the minimum number of files:

  • XMLExample.pro - profile;
  • mainwindow.h - header file of the main application window;
  • mainwindow.cpp - source of window;
  • main.cpp - the main source file from which the application starts;
  • mainwindow.ui - form of the main application window;
Looking for a Job?
25,000.00 руб. - 30,000.00 руб.
Разработчик Qt/C++
Barnaul, Altai Krai, Russia

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

e
Oct. 14, 2019, 2:59 p.m.
erina_m

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

  • Result:78points,
  • Rating points2
S
Oct. 14, 2019, 4:09 a.m.
Sergey1985

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

  • Result:80points,
  • Rating points4
AM
Oct. 12, 2019, 5:24 p.m.
Arshak Martirosyan

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

  • Result:66points,
  • Rating points-1
Last comments
Oct. 14, 2019, 7:48 a.m.
Evgenij Legotskoj

Добрый день. Нет, если сами по себе координаты при ресайзе все подсчитываются правильно, то это уже проблема графической подсистемы в ОС и работы с X11, если вы конечно под Linux собирали проект…
m
Oct. 13, 2019, 9:17 a.m.
magrif

Здравствуйте. Сделал подобным образом ресайз и в Qt Widgets, и в QML. Везде получаю, что при изменении размера через левую или верхннюю границы проихсодит мерцание подобно как на этом виде…
Oct. 6, 2019, 1:44 p.m.
Evgenij Legotskoj

Может база не открылась в прошлый раз. Либо пересобрали проект. хз, если честно ))
s
Oct. 6, 2019, 11:27 a.m.
sander-007

Добрый день Евгений. Спасибо за пример, все понятно. Попытался сделать по аналогии сохранение в базе MySQL заготовок отчетов excel, но MySQL ругается на нарушение в строке запроса. Я подозреваю,…
Sept. 30, 2019, 3:33 a.m.
Evgenij Legotskoj

Если честно то с авторизацией в мобильном приложении я не работал. Знаю, что для таких вещей используют батарейку Django Rest Framework, с помощью которого можно получить токена для самого сайта…
Now discuss on the forum
Oct. 14, 2019, 2:51 p.m.
Evgenij Legotskoj

Добрый день. Первое, что приходит на ум, то можно подружить это дело через веб сокеты. Со стороны Django - это использование батарейки django-channels, а со стороны это QtWebSockets. …
Oct. 11, 2019, 3:11 a.m.
Evgenij Legotskoj

Понятно. Мне нужен пример вашего кода с проблемой. Если сможете накидать вырезку из вашего проекта, которую можно будет скомпилировать и посмотреть, что там происходит, то попробую помочь. Но бы…
t
Oct. 10, 2019, 10:58 a.m.
tantrido

Вот ответ на мой вопрос: https://doc.qt.io/qt-5/qtvirtualkeyboard-deployment-guide.html#creating-inputpanel The input panel must be a sibling element next to the application conta…
Oct. 9, 2019, 3:45 p.m.
Evgenij Legotskoj

Добрый день. Нет, я таким не сталкивался, но вот таким образом вы можете разбить тот тег, на ноды, и забрать текст в нормально порядке, а потом вам уже не составит труда, как я думаю, запи…
Oct. 9, 2019, 12:04 p.m.
Vadim Polshkov

Здравствуйте. Все получилось, только редирект сделал по другому redirect(price.file.url) Спасибо вам за помощь!
EVILEG
About
Services
© EVILEG 2015-2019
Recommend hosting TIMEWEB