mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-06-22 22:23:49 +08:00
添加商店内弹出窗消息
使用SpkUiMessage::SendStoreNotification激活,必须在SpkStore构造函数加载完全局SpkPopup类之后才可 使用。
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include "spkpageqsstest.h"
|
||||
#include "spkpopup.h"
|
||||
#include "spkui_general.h"
|
||||
|
||||
SpkUi::SpkPageQssTest::SpkPageQssTest(QWidget *parent) : QSplitter(parent)
|
||||
@@ -42,6 +43,14 @@ SpkUi::SpkPageQssTest::SpkPageQssTest(QWidget *parent) : QSplitter(parent)
|
||||
Loading->setObjectName("spk_pg_qsstest_loading");
|
||||
Loading->start();
|
||||
|
||||
PopupText = new QLineEdit(this);
|
||||
PopupText->setObjectName("spk_pg_qsstest_poptext");
|
||||
PopupText->setText("Hello, world");
|
||||
|
||||
ShowPopup = new QPushButton(this);
|
||||
ShowPopup->setText("Show Popup");
|
||||
connect(ShowPopup, &QPushButton::clicked, this, &SpkPageQssTest::ShowPopupSlot);
|
||||
|
||||
SlideV = new QSlider(this);
|
||||
SlideV->setObjectName("spk_pg_qsstest_slider_v");
|
||||
SlideV->setOrientation(Qt::Vertical);
|
||||
@@ -60,6 +69,8 @@ SpkUi::SpkPageQssTest::SpkPageQssTest(QWidget *parent) : QSplitter(parent)
|
||||
VLayBtn->addWidget(Chk);
|
||||
VLayBtn->addWidget(Rad);
|
||||
VLayBtn->addWidget(Loading);
|
||||
VLayBtn->addWidget(PopupText);
|
||||
VLayBtn->addWidget(ShowPopup);
|
||||
|
||||
Group = new QGroupBox(this);
|
||||
Group->setObjectName("spk_pg_qsstest_groupbox");
|
||||
@@ -102,3 +113,8 @@ void SpkUi::SpkPageQssTest::FetchStylesheet()
|
||||
{
|
||||
TextStylesheet->setPlainText(SpkUi::CurrentStylesheet);
|
||||
}
|
||||
|
||||
void SpkUi::SpkPageQssTest::ShowPopupSlot()
|
||||
{
|
||||
SpkUi::Popup->Show(PopupText->text());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user