修改设置界面为独立弹窗
This commit is contained in:
@ -11,7 +11,6 @@
|
||||
#include <exception>
|
||||
#include <QResizeEvent>
|
||||
#include "globalvariables.h"
|
||||
#include "settingsscreen.h"
|
||||
#include "mythread.h"
|
||||
#include "config.h"
|
||||
|
||||
@ -33,12 +32,8 @@ MainScreen::MainScreen(QWidget *parent) :
|
||||
button->setText(QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||||
layout = new QHBoxLayout;
|
||||
miniblink = new QMiniBlink(this);
|
||||
settingScreen = new SettingsScreen;
|
||||
settingScreen->setMinimumHeight(height());
|
||||
settingScreen->setHidden(true);
|
||||
layout->addWidget(widget, 1);
|
||||
layout->addWidget(miniblink, 4);
|
||||
layout->addWidget(settingScreen);
|
||||
this->setLayout(layout);
|
||||
layout->setMargin(0);
|
||||
//miniblink->setAttribute(Qt::WA_DeleteOnClose);
|
||||
@ -65,10 +60,8 @@ MainScreen::~MainScreen() {
|
||||
delete button;
|
||||
emit ondestroy();
|
||||
layout->removeWidget(miniblink);
|
||||
layout->removeWidget(settingScreen);
|
||||
layout->removeWidget(widget);
|
||||
delete miniblink;
|
||||
delete settingScreen;
|
||||
delete widget;
|
||||
delete layout;
|
||||
delete ui;
|
||||
@ -83,26 +76,17 @@ void MainScreen::clickButton1(QString text, QString url) {
|
||||
if (text == QString::fromLocal8Bit("<EFBFBD>Ŷ")) {
|
||||
widget->setHidden(false);
|
||||
miniblink->setHidden(false);
|
||||
settingScreen->setHidden(true);
|
||||
emit changeUrl(url_full);
|
||||
|
||||
}
|
||||
else if (text == QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")){
|
||||
miniblink->setHidden(true);
|
||||
widget->setHidden(true);
|
||||
settingScreen->setHidden(false);
|
||||
|
||||
}
|
||||
else {
|
||||
widget->setHidden(true);
|
||||
miniblink->setHidden(false);
|
||||
settingScreen->setHidden(true);
|
||||
emit changeUrl(url_full);
|
||||
}
|
||||
}
|
||||
void MainScreen::startWeChat() {
|
||||
QString path = QApplication::applicationDirPath();
|
||||
QString exe = path + "/wxdk.exe";
|
||||
QString exe = path + "/app/wxdk.exe";
|
||||
ShellExecute(GetDesktopWindow(), L"open", exe.toStdWString().c_str(), L"79c86fb12b36dfa33d1a537c9af100b4c7928a9c", path.toStdWString().c_str(), SW_SHOW);
|
||||
}
|
||||
//void MainScreen::resizeEvent(QResizeEvent *event) {
|
||||
|
Reference in New Issue
Block a user