第一阶段完成,等测试
parent
6a695e8a03
commit
6fa68053bb
Binary file not shown.
|
@ -33,10 +33,11 @@ void MyButton::paintEvent(QPaintEvent *e) {
|
|||
setContentsMargins(0,0,0,0);
|
||||
QFont ft;
|
||||
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);
|
||||
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){
|
||||
painter.setPen(text_cover_color);
|
||||
|
|
|
@ -92,6 +92,7 @@ void MainScreen::clickButton1(QString text, QString url) {
|
|||
void MainScreen::startWeChat() {
|
||||
QString path = QApplication::applicationDirPath();
|
||||
QString exe = path + "/app/wxdk.exe";
|
||||
path.replace("/", "\\");
|
||||
ShellExecute(GetDesktopWindow(), L"open", exe.toStdWString().c_str(), L"79c86fb12b36dfa33d1a537c9af100b4c7928a9c", path.toStdWString().c_str(), SW_SHOW);
|
||||
}
|
||||
//void MainScreen::resizeEvent(QResizeEvent *event) {
|
||||
|
|
|
@ -54,6 +54,7 @@ void MainWindowLayout::resizeEvent(QResizeEvent *event) {
|
|||
void MainWindowLayout::clickButton(QString text, QString url) {
|
||||
QString path = QApplication::applicationDirPath();
|
||||
path += "/app/startcalc.exe";
|
||||
path.replace("/", "\\");
|
||||
if (text== QString::fromLocal8Bit("计算器")) {
|
||||
WinExec(path.toStdString().c_str(), SW_SHOW);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue