Line | |
---|
1 | #include <QApplication>
|
---|
2 | #include <QCleanlooksStyle>
|
---|
3 | #include <QLocale>
|
---|
4 |
|
---|
5 | #include <stdio.h>
|
---|
6 | #include "svnversion.h"
|
---|
7 | #include "file_ui.h"
|
---|
8 | #include <QFileDialog>
|
---|
9 |
|
---|
10 | int main(int argc, char *argv[]) {
|
---|
11 | printf(SVN_REV);
|
---|
12 |
|
---|
13 | QLocale::setDefault(QLocale::C);
|
---|
14 | QApplication app(argc, argv);
|
---|
15 | app.setStyle(new QCleanlooksStyle);
|
---|
16 |
|
---|
17 | file_ui* files=new file_ui();
|
---|
18 | files->connect(files, SIGNAL(finished()), &app, SLOT(quit()));
|
---|
19 |
|
---|
20 | QString path= QFileDialog::getExistingDirectory(new QWidget(), "Select a directory",0,0);
|
---|
21 | QDir directory(path);
|
---|
22 | QStringList list_files=directory.entryList();
|
---|
23 |
|
---|
24 | for(int i=0;i<list_files.size();i++) {
|
---|
25 | files->addFile(directory.path()+"/"+list_files.at(i));
|
---|
26 | }
|
---|
27 |
|
---|
28 | files->endOfFiles();
|
---|
29 |
|
---|
30 | app.exec();
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.