![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
QT
永不止步啊
这个作者很懒,什么都没留下…
展开
-
invalid use of incomplete type ‘class QWidget‘
qt继承qwidget原创 2023-08-03 09:42:51 · 686 阅读 · 0 评论 -
QLayout: Attempting to add QLayout ““ to MainWindow ““, which already has a layout
文章目录一、问题二、解决办法一、问题qt运行时,会报如下提示:QLayout: Attempting to add QLayout “” to MainWindow “”, which already has a layout研究了下面这篇文章的方法,发现自己就是这样做的,还是会报如上错。参考连接:QLayout: Attempting to add QLayout “” to MainWindow “”, which already has a layout二、解决办法创建layout原创 2022-03-23 18:46:35 · 2947 阅读 · 0 评论 -
QT实现表格View空白区域不响应ContextMenuRequested
文章目录一、问题描述二、解决办法一、问题描述设计初衷是,表格的某一项右键选中后,弹出菜单。但是在空白非有效区域点击右键后,系统会认为上次的选择仍然有效,仍会弹出右键菜单,如上图所示。二、解决办法调用*[override virtual] QModelIndex QTreeView::indexAt(const QPoint &point) const*函数,判断点击处是否有index存在。> void TableView::onCustomContextMenuRequeste原创 2022-03-21 20:18:47 · 594 阅读 · 0 评论 -
Qt出错信息undefined reference to vtable for classname
在QT里定义了一个新类,编译后出现如下错误。“undefined reference to `vtable for classname”网上找了一圈,适合我的办法是: clean all,然后重新编译,问题解决。仅供参考。原创 2022-03-19 08:00:27 · 352 阅读 · 0 评论 -
ui(new Ui::MainWindow) 解惑
文章目录一、问题描述二、使用步骤1.引入库2.读入数据总结一、问题描述QT生成一个简单的MainWindow工程后,mainwindows.cpp中,实现了MainWindow的构造函数,见如下代码。MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)冒号后面的两行代码,是C++的列表初始化。其中QMainWindow(parent) 是调用示例:pandas原创 2022-02-14 17:12:16 · 8412 阅读 · 5 评论