Hello!
I would like to create a table but it is not showing the last column name. Why and how can i fix it?
DataWindow
::DataWindow(QWidget *parent
) : QDialog( parent
), ui
(new Ui
::DataWindow){
ui->setupUi( this );
QStringList colsnames;
//It will be #, 1, 2, 3, ... 20. colsnames << "#";
for(int i = 0; i < 20; i++)
colsnames <<
QString::number( (i
+ 1) );
ui->historicLM->setHorizontalHeaderLabels( colsnames );
//ui->label->setText( QString::number( colsnames.size( ) ) );
// Set the column size.
for(int i = 0; i < 21; i++)
ui->historicLM->setColumnWidth(i, 20);
}
DataWindow::DataWindow(QWidget *parent) : QDialog( parent ), ui(new Ui::DataWindow)
{
ui->setupUi( this );
QStringList colsnames; //It will be #, 1, 2, 3, ... 20.
colsnames << "#";
for(int i = 0; i < 20; i++)
colsnames << QString::number( (i + 1) );
ui->historicLM->setHorizontalHeaderLabels( colsnames );
//ui->label->setText( QString::number( colsnames.size( ) ) );
// Set the column size.
for(int i = 0; i < 21; i++)
ui->historicLM->setColumnWidth(i, 20);
}
To copy to clipboard, switch view to plain text mode
My table:1234.jpg
Bookmarks