![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
QT
我七号放假
这个作者很懒,什么都没留下…
展开
-
QTabelWidget 获取任意一个控件在表格的位置
//pBtn 是setCellWidget关联表格控件 QPoint _pt=pBtn->mapToGlobal(QPoint(0,0));_pt=_tableInfo.mapFromGlobal(_pt);int _headerHeight=_tableInfo.horizontalHeader()->height();_pt -=QPoint(0,_headerHeight);QModelIndex _index=_tableInfo.indexAt(_pt);通过坐标系的转.原创 2021-06-24 09:20:36 · 465 阅读 · 0 评论 -
QSortFilterProxyModel 简单的应用
class CustomSortFilterProxyModel:public QSortFilterProxyModel{ Q_OBJECTpublic: explicit CustomSortFilterProxyModel(QObject *parent = Q_NULLPTR):QSortFilterProxyModel(parent){} ~CustomSortFilterProxyModel(){}public slots: void inputValue.原创 2021-05-25 08:50:37 · 311 阅读 · 0 评论 -
QTableWidget 添加委托
class SvgItemDesDlgTableWidgetDelegate:public QItemDelegate{ Q_OBJECTpublic: explicit SvgItemDesDlgTableWidgetDelegate(QObject* parent=nullptr) :QItemDelegate(parent) {} ~SvgItemDesDlgTableWidgetDelegate(){} // QAbstractItem.原创 2021-05-24 14:41:22 · 358 阅读 · 0 评论 -
Qt 字符串转double类型
//判断是否是数字static inline bool isDigit(ushort ch){ static quint16 magic = 0x3ff; return ((ch >> 4) == 3) && (magic >> (ch & 15));}//字符转换static qreal toDouble(const QChar *&str){ const int maxLen = 255;//technica.原创 2021-05-20 14:32:16 · 2485 阅读 · 0 评论