关于 error: comparison between ... 'QPushButton*' and 'QAbstractButton*' lacks... 的解决方法

简介: 关于 error: comparison between ... 'QPushButton*' and 'QAbstractButton*' lacks... 的解决方法

需求

       修改他人代码出现报错如下:

图片.png

error: comparison between distinct pointer types 'QPushButton*' and 'QAbstractButton*' lacks a cast


解决方法

      加入#include<QPushButton>

图片.png

error: comparison between distinct pointer types 'QPushButton*' and 'QAbstractButton*' lacks a cast



相关文章
|
5月前
|
资源调度 前端开发
编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)
编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)
387 0
|
2月前
解决Flutter报错The named parameter |method ‘xxxx‘ isn‘t defined.
解决Flutter报错The named parameter |method ‘xxxx‘ isn‘t defined.
84 3
|
2月前
解决QT中报错xxx.h:4:10: ‘QMainWindow‘ file not found
解决QT中报错xxx.h:4:10: ‘QMainWindow‘ file not found
94 0
Parsing error: duplicate-attribute.eslintvue/no-parsing-error,Eslint如何添加两个@Click事件
Parsing error: duplicate-attribute.eslintvue/no-parsing-error,Eslint如何添加两个@Click事件
|
安全
[-] .\Navicat-Cracker NavicatCrackerDlg.cpp:332 -3All patch solutions are suppressed. Patch abort!HI
[-] .\Navicat-Cracker NavicatCrackerDlg.cpp:332 -3All patch solutions are suppressed. Patch abort!HI
2131 0
SAP GUI 遇到 Error in Parser-Thread 错误的解决方法
SAP GUI 遇到 Error in Parser-Thread 错误的解决方法
522 0
SAP GUI 遇到 Error in Parser-Thread 错误的解决方法
|
Dart 开发工具 Kotlin
【错误记录】Flutter 编译报错 ( The parameter ‘‘ can‘t have a value of ‘null‘ because of its type, but the im )
【错误记录】Flutter 编译报错 ( The parameter ‘‘ can‘t have a value of ‘null‘ because of its type, but the im )
645 0
【错误记录】Flutter 编译报错 ( The parameter ‘‘ can‘t have a value of ‘null‘ because of its type, but the im )
IDEA 解决Number objects are compared using '==', not 'equals()' 警告
IDEA 解决Number objects are compared using '==', not 'equals()' 警告
|
缓存
HALCON error #5190: Invalid window parameter的解决办法(需要hcanvas.dll文件)
HALCON error #5190: Invalid window parameter的解决办法(需要hcanvas.dll文件)
723 0
cannot open layout editor - how to fix error message
cannot open layout editor - how to fix error message
cannot open layout editor - how to fix error message