#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
Q_OBJECT
public:
~MainWindow();
protected:
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
protected:
void changeEvent(QEvent *e);
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
To copy to clipboard, switch view to plain text mode
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
/*
* this is what I want to do eventually
int numberDatasets = 5;
for(int i=0; i<numberDatasets; ++i) {
int row = datasetMain_table->rowCount();
datasetMain_table->insertRow(row);
// name, description, date, notes
datasetMain_table->setItem(row, 0, "dataset name blah.dat");
datasetMain_table->setItem(row, 1, "This is a test dataset from 1/1/1/1/15953 hb blah");
datasetMain_table->setItem(row, 2, "6/3/86");
datasetMain_table->setItem(row, 3, "We have this run on 1,2,3");
}*/
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow
::changeEvent(QEvent *e
) {
switch (e->type()) {
ui->retranslateUi(this);
break;
default:
break;
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
/*
* this is what I want to do eventually
int numberDatasets = 5;
for(int i=0; i<numberDatasets; ++i) {
int row = datasetMain_table->rowCount();
datasetMain_table->insertRow(row);
// name, description, date, notes
datasetMain_table->setItem(row, 0, "dataset name blah.dat");
datasetMain_table->setItem(row, 1, "This is a test dataset from 1/1/1/1/15953 hb blah");
datasetMain_table->setItem(row, 2, "6/3/86");
datasetMain_table->setItem(row, 3, "We have this run on 1,2,3");
}*/
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
To copy to clipboard, switch view to plain text mode
}
Bookmarks