MainWindow::MainWindow(QWidget *parent) : QDialog(parent) { ui.setupUi(this); DataTree *tree = this->findChild<DataTree *>(tr("treeWidget")); QStringList headers; headers << tr("title"); tree->setHeaderLabels(headers); tree->setHeaderHidden(true); auto exportButton = this->findChild<QPushButton *>(tr("pushButton_exportData")); if (exportButton) { this->connect(exportButton, SIGNAL(clicked()), this, SLOT(onExportData())); } auto setExportPathButton = this->findChild<QPushButton *>(tr("pushButton_setExportPath")); if (setExportPathButton) { this->connect(setExportPathButton, SIGNAL(clicked()), this, SLOT(onSetExportPath())); } auto helpButton = this->findChild<QPushButton *>(tr("pushButton_help")); if (helpButton) { this->connect(helpButton, SIGNAL(clicked()), this, SLOT(onHelp())); } this->setAcceptDrops(true); loadOpenedFileList(); //QString filename = QObject::tr("D:\\dev\\project\\misc\\qt\\DataExporter\\data\\test.xlsx"); //tree->loadData(filename); }