try basic code from SO
This commit is contained in:
@@ -54,6 +54,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
ui->canFramesView->setColumnWidth(6, 225);
|
||||
QHeaderView *HorzHdr = ui->canFramesView->horizontalHeader();
|
||||
HorzHdr->setStretchLastSection(true); //causes the data column to automatically fill the tableview
|
||||
connect(HorzHdr, SIGNAL(sectionClicked(int)), this, SLOT(on_sectionClicked(int)));
|
||||
|
||||
graphingWindow = NULL;
|
||||
frameInfoWindow = NULL;
|
||||
@@ -234,6 +235,13 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
||||
exitApp();
|
||||
}
|
||||
|
||||
void MainWindow::on_sectionClicked ( int logicalIndex )
|
||||
{
|
||||
QHeaderView *HorzHdr = ui->canFramesView->horizontalHeader();
|
||||
HorzHdr->setSortIndicator(logicalIndex, Qt::AscendingOrder);
|
||||
ui->canFramesView->sortByColumn(logicalIndex);
|
||||
}
|
||||
|
||||
void MainWindow::updateSettings()
|
||||
{
|
||||
readUpdateableSettings();
|
||||
|
||||
@@ -102,6 +102,7 @@ public slots:
|
||||
void readUpdateableSettings();
|
||||
void gotCenterTimeID(int32_t ID, double timestamp);
|
||||
void updateConnectionSettings(QString connectionType, QString port, int speed0, int speed1);
|
||||
void on_sectionClicked ( int logicalIndex );
|
||||
|
||||
signals:
|
||||
void sendCANFrame(const CANFrame *, int);
|
||||
|
||||
Reference in New Issue
Block a user