mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 12:52:04 +08:00
UiTest新增About窗口测试
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include "spkabout.h"
|
||||||
#include "spkpageuitest.h"
|
#include "spkpageuitest.h"
|
||||||
#include "spkpopup.h"
|
#include "spkpopup.h"
|
||||||
#include "spkui_general.h"
|
#include "spkui_general.h"
|
||||||
@@ -51,6 +52,10 @@ SpkUi::SpkPageUiTest::SpkPageUiTest(QWidget *parent) : QSplitter(parent)
|
|||||||
ShowPopup->setText("Show Popup");
|
ShowPopup->setText("Show Popup");
|
||||||
connect(ShowPopup, &QPushButton::clicked, this, &SpkPageUiTest::ShowPopupSlot);
|
connect(ShowPopup, &QPushButton::clicked, this, &SpkPageUiTest::ShowPopupSlot);
|
||||||
|
|
||||||
|
ShowAbout = new QPushButton(this);
|
||||||
|
ShowAbout->setText("Show About Dialog");
|
||||||
|
connect(ShowAbout, &QPushButton::clicked, [](){ SpkAbout::Show(); });
|
||||||
|
|
||||||
SlideV = new QSlider(this);
|
SlideV = new QSlider(this);
|
||||||
SlideV->setObjectName("spk_pg_qsstest_slider_v");
|
SlideV->setObjectName("spk_pg_qsstest_slider_v");
|
||||||
SlideV->setOrientation(Qt::Vertical);
|
SlideV->setOrientation(Qt::Vertical);
|
||||||
@@ -71,6 +76,7 @@ SpkUi::SpkPageUiTest::SpkPageUiTest(QWidget *parent) : QSplitter(parent)
|
|||||||
VLayBtn->addWidget(Loading);
|
VLayBtn->addWidget(Loading);
|
||||||
VLayBtn->addWidget(PopupText);
|
VLayBtn->addWidget(PopupText);
|
||||||
VLayBtn->addWidget(ShowPopup);
|
VLayBtn->addWidget(ShowPopup);
|
||||||
|
VLayBtn->addWidget(ShowAbout);
|
||||||
|
|
||||||
Group = new QGroupBox(this);
|
Group = new QGroupBox(this);
|
||||||
Group->setObjectName("spk_pg_qsstest_groupbox");
|
Group->setObjectName("spk_pg_qsstest_groupbox");
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ namespace SpkUi
|
|||||||
SpkLoading *Loading;
|
SpkLoading *Loading;
|
||||||
|
|
||||||
QLineEdit *PopupText;
|
QLineEdit *PopupText;
|
||||||
QPushButton *ShowPopup;
|
QPushButton *ShowPopup,
|
||||||
|
*ShowAbout;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void SetStylesheet();
|
void SetStylesheet();
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include "spkui_general.h"
|
#include "spkui_general.h"
|
||||||
#include "spkstore.h"
|
#include "spkstore.h"
|
||||||
|
|
||||||
#include "spkabout.h"
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@@ -14,7 +13,5 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
SpkStore store(false, LogPath);
|
SpkStore store(false, LogPath);
|
||||||
|
|
||||||
SpkAbout::Show();
|
|
||||||
|
|
||||||
return QApplication::exec();
|
return QApplication::exec();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user