提交测试,基本完成
This commit is contained in:
@ -37,6 +37,9 @@ MainScreen::MainScreen(QWidget *parent) :
|
||||
//button->setStyleSheet("text-color:white");
|
||||
layout = new QHBoxLayout;
|
||||
miniblink = new QMiniBlink(this);
|
||||
application_manager = new ApplicationManager(this);
|
||||
application_manager->setHidden(true);
|
||||
layout->addWidget(application_manager);
|
||||
layout->addWidget(widget, 1);
|
||||
layout->addWidget(miniblink, 4);
|
||||
this->setLayout(layout);
|
||||
@ -64,8 +67,10 @@ MainScreen::~MainScreen() {
|
||||
delete layout_left;
|
||||
delete button;
|
||||
emit ondestroy();
|
||||
layout->removeWidget(application_manager);
|
||||
layout->removeWidget(miniblink);
|
||||
layout->removeWidget(widget);
|
||||
delete application_manager;
|
||||
delete miniblink;
|
||||
delete widget;
|
||||
delete layout;
|
||||
@ -79,13 +84,28 @@ void MainScreen::firstUrl(QString url)
|
||||
void MainScreen::clickButton1(QString op,QString url) {
|
||||
QString url_full = BASE_URL + url + url_param;
|
||||
if (op == "openwechat") {
|
||||
OpenWeChatRequest open_wechat_request;
|
||||
QString msg = open_wechat_request.sendRequest();
|
||||
if(msg!="ok")
|
||||
{
|
||||
QMessageBox::information(this, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), msg);
|
||||
return;
|
||||
}
|
||||
widget->setHidden(false);
|
||||
miniblink->setHidden(false);
|
||||
application_manager->setHidden(true);
|
||||
emit changeUrl(url_full);
|
||||
}
|
||||
else if(op=="app_mgr")
|
||||
{
|
||||
miniblink->setHidden(true);
|
||||
widget->setHidden(true);
|
||||
application_manager->setHidden(false);
|
||||
}
|
||||
else {
|
||||
widget->setHidden(true);
|
||||
miniblink->setHidden(false);
|
||||
application_manager->setHidden(true);
|
||||
emit changeUrl(url_full);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user