Home Database Mysql Tutorial "Unhandled exception in app.exe (QtGuid4.dll): 0xC0

"Unhandled exception in app.exe (QtGuid4.dll): 0xC0

Jun 07, 2016 pm 03:38 PM
a amp exception quot

本文要 解决 的Qt调试问题截图如下: 起因 :在代码中添加类型为QColor的二维数组,存储图片每个像素。 现象 :调试时出现上图所示 错误 。 原因 :经过百度以及反复查看代码,发现在代码中,有数组越界的情况。因为定义的时候,数组的两个维度大小不一样,

本文要解决的Qt调试问题截图如下:

"Unhandled exception in app.exe (QtGuid4.dll): 0xC0

 

起因:在代码中添加类型为QColor的二维数组,存储图片每个像素。

 

现象:调试时出现上图所示错误

 

原因:经过百度以及反复查看代码,发现在代码中,有数组越界的情况。因为定义的时候,数组的两个维度大小不一样,而在实

           现 QWidget的重画事件时,因为坐标系的差别,使得两个维度的顺序对换,使得发生数组越界的情况。

 

详细解释:在程序中我定义的数组是QColor color [ Height ] [ Width ], 我的本意是Height代表图片的高度,Height的初值为400;Width

                  代表图片的高度,Width的初值为600。

                  然而在Qt的paintEvent事件中,QPainter中的 drawPoint( int x,int y )函数中,x表示的是图片的横坐标,对应数组的Width;

                  y表示图片的纵坐标,对应数组的Height。

                  由于在刚开始没有意识到坐标系与数组维度的对应关系,使得对应错误,导致越界。

 

 

如有疑问,请留言!如有问题,求指正!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Causes and solutions to ConcurrentModificationException exceptions in Java Causes and solutions to ConcurrentModificationException exceptions in Java Jun 25, 2023 am 10:33 AM

In Java, when multiple threads operate a collection object at the same time, a ConcurrentModificationException exception may occur. This exception usually occurs when traversing the collection when modifying or deleting elements. This will cause the state of the collection to be inconsistent, thus throwing abnormal. This article will delve into the causes and solutions to this exception. 1. Causes of Exception Normally, ConcurrentModificationException exception

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

Top 10 virtual currency trading app platforms 2025 Top 10 virtual currency trading app platforms latest list Top 10 virtual currency trading app platforms 2025 Top 10 virtual currency trading app platforms latest list Mar 06, 2025 pm 04:21 PM

The top ten virtual currency trading app platforms in 2025 are: 1. OKX; 2. Binance; 3. Gate.io; 4. Huobi Global; 5. Kraken; 6. Coinbase; 7. KuCoin; 8. Crypto.com; 9. Bitfinex; 10. MEXC Global. The ranking considers factors such as market share, user experience, security, transaction fees, etc., but is for reference only.

What coin is AMP? What coin is AMP? Feb 24, 2024 pm 09:16 PM

What is AMP Coin? The AMP token was created by the Synereo team in 2015 as the main trading currency of the Synereo platform. AMP token aims to provide users with a better digital economic experience through multiple functions and uses. Purpose of AMP Token The AMP Token has multiple roles and functions in the Synereo platform. First, as part of the platform’s cryptocurrency reward system, users are able to earn AMP rewards by sharing and promoting content, a mechanism that encourages users to participate more actively in the platform’s activities. AMP tokens can also be used to promote and distribute content on the Synereo platform. Users can increase the visibility of their content on the platform by using AMP tokens to attract more viewers to view and share

AMD Ryzen AI is now only available on Windows, with plans to support Linux in the future AMD Ryzen AI is now only available on Windows, with plans to support Linux in the future Oct 22, 2023 pm 12:01 PM

According to news on October 22, AMD’s latest Ryzen7040 series laptops are equipped with a dedicated AI engine called “RyzenAI”, which is based on Xilinx IP and is designed to accelerate the operation of machine learning frameworks such as PyTorch and TensorFlow. However, currently RyzenAI only supports Microsoft Windows operating system, but as customer demand continues to grow, this situation may change. As early as June this year, AMD released some RyzenAI demo codes on GitHub. Although some of them are open source, they are only available for Windows systems, and AMD has not released any RyzenAILinux drivers. subsequently

How to deal with UnsupportedEncodingException in Java? How to deal with UnsupportedEncodingException in Java? Jun 25, 2023 am 08:02 AM

How to deal with UnsupportedEncodingException in Java? In Java programming, you may encounter UnsupportedEncodingException. This exception is usually caused by incorrect encoding conversion or an unsupported encoding. In this article, we will introduce the causes of UnsupportedEncodingException exception and how to deal with it. What is UnsupportedE

Solution to PHP Fatal error: Uncaught exception 'PDOException' Solution to PHP Fatal error: Uncaught exception 'PDOException' Jun 23, 2023 pm 12:09 PM

In PHP development, you may encounter errors such as "PHPFatalerror:Uncaughtexception'PDOException'". This is an exception caused by an error when PHP operates the database. If this error is not handled in time, it will cause program interruption or unexpected errors. So how to solve this problem? Here are some common solutions. 1. Check the database parameters. First, we need to check the parameters passed when connecting to the database.

Loongson 3A6000 challenges Core 10th generation: performance comparable to new generation processors! Loongson 3A6000 challenges Core 10th generation: performance comparable to new generation processors! Nov 11, 2023 pm 12:01 PM

According to news on November 11, Loongson Zhongke’s business model is gradually showing a completely different look from that of industry giants. Hu Weiwu, the company's CEO, said that unlike Huawei, Haiguang and Sugon, which adopt the IBM model, Loongson is more focused on building an ecosystem, likening it to Intel's business model. However, affected by policy market stagnation, Loongson Zhongke's performance has been relatively weak in the past period. According to the third quarter report, the operating income in the first three quarters of this year was 394.3 million yuan, a year-on-year decrease of 18.49%; the net profit attributable to the parent company dropped to -206.9 million yuan, a year-on-year decrease of 383.24%. According to the editor’s understanding, Hu Weiwu said at the performance meeting that for the recovery of the government policy market in the fourth quarter of 2023

See all articles