1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00

为MPTableWidget增添函数

This commit is contained in:
tianduanrui 2018-01-14 16:30:51 +08:00
parent 797283a7ef
commit d18c3a43e0
2 changed files with 9 additions and 0 deletions

View File

@ -209,6 +209,14 @@ void QQtMPTableWidget::setAlternatingRowColors ( bool alt )
altColor = alt;
}
void QQtMPTableWidget::setHeaderData(Qt::Orientation, QStringList dataList)
{
for(int i =0; i < dataList.size(); i++)
{
m_headerData.insert(i, dataList.at(i));
}
}
void QQtMPTableWidget::setHeaderData ( int i, Qt::Orientation, QString data )
{
m_headerData.insert ( i, data );

View File

@ -35,6 +35,7 @@ public:
void setResizeMode ( QHeaderView::ResizeMode mode = QHeaderView::ResizeToContents );
void setResizeMode ( int column, QHeaderView::ResizeMode mode = QHeaderView::ResizeToContents );
void setAlternatingRowColors ( bool alt = true );
void setHeaderData ( Qt::Orientation, QStringList dataList );
void setHeaderData ( int i, Qt::Orientation, QString data );
void setColumnWidth ( int column, int width );
void query ( QString filter = "1=1" );