第一阶段完成,等测试
This commit is contained in:
Binary file not shown.
@ -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;
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊɶ<CEAA><C9B6>3<EFBFBD><33><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2>֪<EFBFBD><D6AA>
|
||||||
|
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);
|
||||||
|
@ -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) {
|
||||||
|
@ -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("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")) {
|
if (text== QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")) {
|
||||||
WinExec(path.toStdString().c_str(), SW_SHOW);
|
WinExec(path.toStdString().c_str(), SW_SHOW);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user