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