第一阶段完成,等测试

master
Mike Solar 2023-08-02 07:18:10 +08:00
parent 6a695e8a03
commit 6fa68053bb
4 changed files with 5 additions and 2 deletions

Binary file not shown.

View File

@ -33,10 +33,11 @@ void MyButton::paintEvent(QPaintEvent *e) {
setContentsMargins(0,0,0,0); setContentsMargins(0,0,0,0);
QFont ft; QFont ft;
ft.setPixelSize(TEXT_SIZE); ft.setPixelSize(TEXT_SIZE);
int text_x=(width()-TEXT_SIZE*text.length()*scale*2)/2; //别问我为啥乘3我也不知道
int text_x=(width()-TEXT_SIZE*text.length()*scale*3)/2;
int text_y=(logo_width+logo_y+10); int text_y=(logo_width+logo_y+10);
QRectF logo_rect(logo_x, logo_y, logo_width, logo_width); QRectF logo_rect(logo_x, logo_y, logo_width, logo_width);
QRectF text_rect(text_x,text_y, TEXT_SIZE*text.length()*scale*2,TEXT_SIZE*scale*2); QRectF text_rect(text_x,text_y, TEXT_SIZE*text.length()*scale*3,TEXT_SIZE*scale*3);
if(checked){ if(checked){
painter.setPen(text_cover_color); painter.setPen(text_cover_color);

View File

@ -92,6 +92,7 @@ void MainScreen::clickButton1(QString text, QString url) {
void MainScreen::startWeChat() { void MainScreen::startWeChat() {
QString path = QApplication::applicationDirPath(); QString path = QApplication::applicationDirPath();
QString exe = path + "/app/wxdk.exe"; QString exe = path + "/app/wxdk.exe";
path.replace("/", "\\");
ShellExecute(GetDesktopWindow(), L"open", exe.toStdWString().c_str(), L"79c86fb12b36dfa33d1a537c9af100b4c7928a9c", path.toStdWString().c_str(), SW_SHOW); ShellExecute(GetDesktopWindow(), L"open", exe.toStdWString().c_str(), L"79c86fb12b36dfa33d1a537c9af100b4c7928a9c", path.toStdWString().c_str(), SW_SHOW);
} }
//void MainScreen::resizeEvent(QResizeEvent *event) { //void MainScreen::resizeEvent(QResizeEvent *event) {

View File

@ -54,6 +54,7 @@ void MainWindowLayout::resizeEvent(QResizeEvent *event) {
void MainWindowLayout::clickButton(QString text, QString url) { void MainWindowLayout::clickButton(QString text, QString url) {
QString path = QApplication::applicationDirPath(); QString path = QApplication::applicationDirPath();
path += "/app/startcalc.exe"; path += "/app/startcalc.exe";
path.replace("/", "\\");
if (text== QString::fromLocal8Bit("计算器")) { if (text== QString::fromLocal8Bit("计算器")) {
WinExec(path.toStdString().c_str(), SW_SHOW); WinExec(path.toStdString().c_str(), SW_SHOW);
} }