当前位置:网站首页>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声明定义之后才能进行界面的生成和初始化。
边栏推荐
- Left hand code, right hand open source, part of the open source road
- How to modify the login user name of easynvr video monitoring system?
- Analysis of similarities and differences between redis and memcached in cache use
- A brief introduction to the lexical analysis of PostgreSQL
- Successfully solved: selenium common. exceptions. SessionNotCreatedException: Message: session not created: This versi
- Keyword of ES mapping; Term query add keyword query; Change mapping keyword type
- How to build a high-performance go cache Library
- [sdx62] wcn685x IPA registration failure analysis and solution
- 安防市场进入万亿时代,安防B2B网上商城系统精准对接深化企业发展路径
- When installing Wireshark, npcap cannot be installed successfully. It is recommended to use WinPcap first
猜你喜欢
Bitmap of redis data structure

Laravel 8 realizes auth login

IDEA 插件 Material Theme UI收费后的办法

ES mapping之keyword;term查詢添加keyword查詢;更改mapping keyword類型

Bert-whitening 向量降维及使用

Bert whitening vector dimension reduction and its application

Method after charging the idea plug-in material theme UI

Two way combination of business and technology to build a bank data security management system
An accident caused by a MySQL misoperation, and the "high availability" cannot withstand it!

STM32F1与STM32CubeIDE编程实例-WS2812B全彩LED驱动(基于SPI+DMA)
随机推荐
Multimeter resistance measurement diagram and precautions
Teach you how to deploy the pressure test engine on Tencent cloud
Py's toad: a detailed introduction to toad, its installation and use
A series of problems caused by IPVS connection reuse in kubernetes
This website teaches you to imitate more than 100 well-known websites!
09_ An efficient memory method
07. Tencent cloud IOT device side learning - Data Template
[log service CLS] initial experience of Tencent cloud CLS log service
How to implement redis cache of highly paid programmers & interview questions series 115? How do I find a hot key? What are the possible problems with caching?
Go language concurrency model mpg model
From pair to unordered_ Map, theory +leetcode topic practice
Design of vga/lcd display controller system based on FPGA (Part 2)
postgresql之词法分析简介
Brief discussion on the implementation framework of enterprise power Bi CI /cd
Restoring to an earlier version in CVS
Analysis of similarities and differences between redis and memcached in cache use
Bert-whitening 向量降维及使用
Security Analysis on mining trend of dogecoin, a public cloud
One article to get UDP and TCP high-frequency interview questions!
Golang implements BigInteger large number calculation