@@ -15,17 +15,15 Widget::Widget(QWidget *parent) | |||
|
15 | 15 | |
|
16 | 16 | for (int k = appList.count() - 1; k >= 0; k--) { |
|
17 | 17 | QString name = appList[k].fileName(); |
|
18 |
if (name. |
|
|
19 |
|| name. |
|
|
20 |
|| name.endsWith(" |
|
|
21 | || name.startsWith("tst_") | |
|
22 | || name.startsWith("demoLauncher")) | |
|
18 | if (name.startsWith("tst_") | |
|
19 | || name.startsWith("demoLauncher") | |
|
20 | || (name.right(4).left(1) == "." && !name.endsWith("exe"))) | |
|
23 | 21 | appList.removeAt(k); |
|
24 | 22 | } |
|
25 | 23 | |
|
26 | 24 | QGridLayout* demosLayout = new QGridLayout; |
|
27 | 25 | for( int i = 0; i < appList.count(); i++) { |
|
28 |
QPushButton *button = new QPushButton(appList[i]. |
|
|
26 | QPushButton *button = new QPushButton(appList[i].baseName()); | |
|
29 | 27 | connect(button, SIGNAL(clicked()), this, SLOT (runApp())); |
|
30 | 28 | demosLayout->addWidget(button, i%10, i/10); |
|
31 | 29 | } |
@@ -41,7 +39,7 Widget::~Widget() | |||
|
41 | 39 | void Widget::runApp() |
|
42 | 40 | { |
|
43 | 41 | QString name = qobject_cast<QPushButton *>(sender())->text(); |
|
44 |
QString program = Q |
|
|
42 | QString program = QDir(BINPATH).absolutePath() + QDir::separator() + name; | |
|
45 | 43 | |
|
46 | 44 | m_demoApp = new QProcess(this); |
|
47 | 45 | m_demoApp->start(program); |
General Comments 0
You need to be logged in to leave comments.
Login now