@@ -13,11 +13,14 Widget::Widget(QWidget *parent) | |||||
13 | QList<QFileInfo> appList; |
|
13 | QList<QFileInfo> appList; | |
14 |
|
14 | |||
15 | QDir appFolder(QApplication::applicationDirPath()); |
|
15 | QDir appFolder(QApplication::applicationDirPath()); | |
16 | QStringList nameFilters; |
|
|||
17 | nameFilters << "[^t][^s][^t]*"; |
|
|||
18 | appFolder.setNameFilters(nameFilters); |
|
|||
19 | appList = appFolder.entryInfoList(QDir::Files); |
|
16 | appList = appFolder.entryInfoList(QDir::Files); | |
20 |
|
17 | |||
|
18 | for (int k = appList.count() - 1; k >= 0; k--) { | |||
|
19 | QString name = appList[k].fileName(); | |||
|
20 | if (name.endsWith("exp") || name.endsWith("dll") || name.endsWith("lib") || name.startsWith("tst_")) | |||
|
21 | appList.removeAt(k); | |||
|
22 | } | |||
|
23 | ||||
21 | QGridLayout* demosLayout = new QGridLayout; |
|
24 | QGridLayout* demosLayout = new QGridLayout; | |
22 | for( int i = 0; i < appList.count(); i++) { |
|
25 | for( int i = 0; i < appList.count(); i++) { | |
23 | QPushButton *button = new QPushButton(appList[i].fileName()); |
|
26 | QPushButton *button = new QPushButton(appList[i].fileName()); | |
@@ -29,7 +32,8 Widget::Widget(QWidget *parent) | |||||
29 |
|
32 | |||
30 | Widget::~Widget() |
|
33 | Widget::~Widget() | |
31 | { |
|
34 | { | |
32 |
m_demoApp |
|
35 | if (m_demoApp) | |
|
36 | m_demoApp->close(); | |||
33 | } |
|
37 | } | |
34 |
|
38 | |||
35 | void Widget::runApp() |
|
39 | void Widget::runApp() |
General Comments 0
You need to be logged in to leave comments.
Login now