当前位置:网站首页>QTreeWidget作为单例模式以dll返回的两个问题
QTreeWidget作为单例模式以dll返回的两个问题
2022-06-24 15:32:00 【kupeThinkPoem】
目录
1、Must construct a QApplication before a QPaintDevice
一、现象
最近写一个Qt的dll,QTreeWiget需要在dll中返回,但是遇到了崩溃等问题。
二、问题
1、Must construct a QApplication before a QPaintDevice
Releases和DEBUG版本的库混在一起了,虽然他们是不同的名字(Debug版本带个d)。
2、程序崩溃
单例往往是静态全局变量,如果在单例的构造函数里面调用new QTreeWidget,QApplication这时还没有定义。在QApplication声明定义之后,再init调用new QTreeWidget,否则会有程序崩溃现象。
三、总结
在制作界面dll得注意,在QApplication声明定义之后才能进行界面的生成和初始化。
边栏推荐
- Service visibility and observability
- Do you really know the difference between H5 and applet?
- In 2021, big companies often ask IOS interview questions -- runloop
- Analysis of dompurify
- Esp32 series -- comparison of esp32 series
- Cvpr2022 𞓜 thin domain adaptation
- Actual combat | a tortuous fishing counteraction
- [log service CLS] a taste of Tencent cloud log service CLS
- R language plot visualization: use plot to visualize the training set and test set after data division, use different shape label representation, training set, test set, and display training and test
- Restoring to an earlier version in CVS
猜你喜欢

Keras deep learning practice (11) -- visual neural network middle layer output

laravel8使用faker调用工厂填充数据

Bert whitening vector dimension reduction and its application

CVPR 2022 - Interpretation of selected papers of meituan technical team

ES mapping之keyword;term查詢添加keyword查詢;更改mapping keyword類型
Record the range of data that MySQL update will lock

Bert-whitening 向量降维及使用
Step by step introduction to sqlsugar based development framework (9) -- Realizing field permission control with WinForm control

Don't underestimate the integral mall. It can play a great role

Go language concurrency model mpg model
随机推荐
Alibaba OSS object storage service
Do you really know the difference between H5 and applet?
Golang implements BigInteger large number calculation
Domestic payment system and payment background construction
Huangchuping presided over the video conference on fixed-point contact with Zhuhai, resolutely implemented the deployment requirements of the provincial Party committee, and ensured positive results i
时间同步业务的闭环管理——时间监测
Phpcms upgrade editor method -- simple and effective
Analysis of dompurify
Teach you how to deploy the pressure test engine on Tencent cloud
R language constructs regression model diagnosis (normality is invalid), performs variable transformation, and uses powertransform function in car package to perform box Cox transform to normality on
ESP32系列--ESP32各个系列对比
证券账户理财安全吗??
一个简单而功能强大的开发者工具箱Box3.cc
在同花顺开户证券安全吗,需要什么准备
How to allow easydss online classroom system to upload an on-demand file with a space in the file name?
Linux Installation cenos7 MySQL - 8.0.26
How to build a high-performance go cache Library
Is it safe to open an account for stock speculation in the top ten securities app rankings in China
Design of vga/lcd display controller system based on FPGA (Part 2)
Use tuples