Qt export to Excel (2) (database | table) The export speed is too slow, the idea of a two-dimensional array

1. Thread export

Open the new thread export method, although the current interface is not affected, but in the sense of time, it has not been improved. If it is the kind of export that requires real-time data, it seems more stretched.

2. Quick export

The reason why the previous export speed is slow is that the data is written line by line into Excel. If the amount of data is large, the export speed will inevitably be slow; therefore, reducing the number of writes will save time.

Optimize the code on the original basis:
Qt export Excel (1) (database | table) The export speed is too slow, use a new thread to export

	/**
 * @brief HistorySave::saveHistory
 * @param fileName  文件名
 * @param dateStr   日期(查询对应日期的数据)
 * 接收的信号
 */
void HistorySave::saveHistory(

Guess you like

Origin blog.csdn.net/qq_45646951/article/details/109860434