In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "Qt how to achieve mixed data graphics and text", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Qt how to achieve mixed data graphics and text" this article.
I. Preface
In addition to being able to print basic text information data to pdf and paper, more and more applications require the ability to export pictures and support mixed arrangement of pictures and texts, which is similar to doc documents, but certainly not too complex, similar to printed reports, with tabular text descriptions and corresponding pictures inserted into them. There are quite a lot of application scenarios of mixed picture and text, for example, the medical industry often outputs diagnostic results with pictures. So to meet this requirement, a new class DataCreat is specially developed to generate report data, and the generated data body can be directly transferred to the DataPrint class. If there are a variety of different mixed format of picture and text, you can generate it directly in the DataCreat class. By default, a template for mixed report of picture and text is provided, and other formats are all in accordance with this format. It is recommended to make it in the form of a structure. For example, the template provided is the UAV monitoring system alarm report.
UAV monitoring system alarm report structure parameters:
Headline
Subtitle
Device name
Coordinate longitude value
Coordinate latitude value
Alarm trigger time
Report print time
Alarm type
Number of alarm devices
Alarm level
Alarm picture collection
Last column stretch fill
Horizontal typesetting
Paper margin
II. Functional features
The component also integrates export data to csv, xls, pdf, and print data.
All operations provide static methods without new, and various parameters such as data and properties are set with structural data, which is very convenient.
It also supports QTableView, QTableWidget, QStandardItemModel, QSqlTableModel and other data sources.
Provide static methods that are directly passed into QTableView and QTableWidget controls to automatically identify column names, column widths, and data contents.
Each set of features provides separate and complete examples, annotated in detail, and is very suitable for all stages of Qter programmers.
Original export data mechanism, does not rely on any office components or operating systems and other third-party libraries, and supports embedded linux.
The speed is so fast that it takes only 2 seconds to complete 100000 rows of data in nine fields.
It only takes four steps to start rapidly exporting large amounts of data, such as 100W records to Excel.
At the same time, it provides direct write data interface and multi-thread write data interface without card main interface.
The title, subtitle and table name can be set.
You can set the field name, column name, and column width of the exported data.
Automatic stretch filling can be set at the end of the column, and the default stretch is more beautiful.
You can set whether to enable check filtering data, and the special color display of the data that conforms to the rules when enabled.
You can specify check columns, check rules, check values, and check value data types.
Verification rules support accurate = =, greater than >, greater than or equal to > =, less than applicationDirPath () + "/ snap/"; for (int I = 0; I)
< count; ++i) { QImage image(listImage.at(i)); if (image.width() >ImageWidth) {QString name = path + QString ("% 1.jpg") .arg (I + 1); image = image.scaled (imageWidth, image.height (), Qt::KeepAspectRatio, Qt::SmoothTransformation); image.save (name, "jpg"); listImage [I] = name;}} / / qDebug ()
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.