File: mainwindow.cpp

package info (click to toggle)
libqxt 0.6.1-6
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 19,004 kB
  • sloc: cpp: 57,512; xml: 296; sh: 251; makefile: 56; php: 14
file content (26 lines) | stat: -rw-r--r-- 495 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "mainwindow.h"
#include <QTreeWidgetItem>
#include <QDebug>
#include <QFileDialog>
#include <QHeaderView>
MainWindow::MainWindow()
{
    ui.setupUi(this);
    model.open("xml.db");
    ui.treeView->setModel(&model);
    ui.treeView->header()->resizeSection ( 0,300);
}

void MainWindow::on_actionLoad_triggered()
{
    model.loadXml(QFileDialog::getOpenFileNames (this, "Load Xml file",QString(), "Xml File (*.xml)"));
}

void MainWindow::on_actionQuit_triggered()
{
    close();
}