Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize Scintillation Point Diagram with Qt

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to use Qt to achieve flicker point map". In daily operation, I believe many people have doubts about how to use Qt to achieve flicker point map. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubt of "how to use Qt to achieve flicker point map". Next, please follow the editor to study!

I. Preface

As a super-large one-stop GUI supermarket development integration environment, Qt not only integrates a large number of visual UI components, but also provides network libraries, database operations, file operations and other class libraries, encapsulating it in one step. According to some programmers around me, since using Qt, I have found that more and more people like to use Qt classes to deal with it. Unless some demanding application scenarios, such as concurrent networks, need to use third-party libraries, it is easy to use classes encapsulated by Qt directly, especially the names of classes and methods, which can be typed almost naturally.

Qt not only has built-in various UI components, but also directly integrates browser controls. Note that this is a cross-platform browser control. Before version 5.6, webkit was integrated, and later webengine was integrated, which greatly enhanced the flexibility and expansibility of the program. Looking at those awesome interfaces in the web world, with the help of browser controls, you can seamlessly connect to Qt programs, and even do a variety of interactions. At present, it seems that there are many similar frameworks, and they are quite popular. For example, NetEase Music client, Nail client, Flying Book client and so on are all implemented with similar mechanisms, using browsers as local applications.

Before using Qt to write that large screen big data electronic Kanban system, in order to meet the needs of users, add a cool flicker picture in the middle of the big screen, the first thing that comes to mind is to borrow echart, after all, it is ready-made open source things, and the official website has a variety of demo to tell you how to use, as long as it is an entry level basically can be done That is, since then, the operation of echart has been encapsulated with Qt so that you can use the class directly next time.

There are three elements at the core of the flicker point map: the name of the city, the longitude and latitude of the city, and the size of the corresponding value. The larger the value, the larger the flicker point. The flicker point usually shows a breathing action, and it feels alive when it is open. As for how echart is drawn with js, we basically don't care, and it is very difficult to open the js code inside, for most of us users. I just need to know how to use it. I don't have to care about the details. I can study it carefully when I have enough time to eat.

II. Functional features

At the same time, support flicker point map, migration map, area map, dashboard and so on.

You can set various colors such as title, prompt, background color, text color, line color, area color, and so on.

You can set the name, value, longitude and latitude collection of the city.

You can set the magnification of the map and whether the mouse wheel is allowed to zoom.

Built-in world map, national map, provincial map, regional map, can be accurate to the county, all maps are used offline.

Built-in provincial and municipal json data file to js file function, if there is a data update self-conversion, support a single file conversion and one-click conversion of all files.

Built-in function to obtain all the names and longitude and latitude information sets of the region from json files or js files, which can be used to display the information obtained by this method.

Depending on the browser component to display the map, the provided demo supports webkit, webengine and ie to load web pages.

Strong expansibility, you can add a variety of exquisite echarts components according to the gourd painting ladle to make a great effect.

The built-in dashboard components provide interactive functionality, and the corresponding code is included in the demo demo.

The function interface is friendly and unified, and it is easy to use, just one class.

Support any Qt version, any system, any compiler.

Third, effect picture

4. Related code / / Core code QString Echarts::newChartPoint () {int cityNameCount = cityName.count (); int cityValueCount = cityValue.count (); int cityPointCount = cityPoint.count (); if (cityNameCount! = cityValueCount | | cityValueCount! = cityPointCount) {return ";} QStringList body; / / add the corresponding value, the larger the circle, the larger the QStringList values For (int I = 0; I < cityNameCount; iTunes +) {values

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report