:QSqlError: No such file or directory
时间: 2023-10-16 19:06:40 浏览: 107
根据提供的引用内容,错误消息中指出找不到文件"QSqlError"。解决方法是将MySQL数据库安装目录下的include文件夹拷贝到QT工程目录下。这样会将mysql.h文件复制到项目目录中,以解决找不到文件的问题。然后,您可以使用QMessageBox::critical函数来显示数据库错误消息。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [qt4中连接mysql出现Cannot open include file: 'QSqlError': No such file or directory](https://blog.csdn.net/weixin_31198993/article/details/113637724)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [error: mysql.h: No such file or directory的解决办法](https://blog.csdn.net/weixin_43222324/article/details/103301268)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文