diff --git a/LedOK/main.cpp b/LedOK/main.cpp index 4497704..26502ac 100644 --- a/LedOK/main.cpp +++ b/LedOK/main.cpp @@ -8,15 +8,15 @@ #ifdef _MSC_VER //MSVC编译器 #include #include - #if _MSC_VER >= 1600 +#if _MSC_VER >= 1600 #pragma execution_character_set("utf-8") - #endif +#endif LONG WINAPI handleException(_EXCEPTION_POINTERS *excep) { - QString errCode = QString::number(excep->ExceptionRecord->ExceptionCode, 16); - QString errAddr = QString::number((uint)excep->ExceptionRecord->ExceptionAddress, 16); - HANDLE hDumpFile = CreateFile(L"c:/ledok-crash.dmp", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + auto errCode = QString::number(excep->ExceptionRecord->ExceptionCode, 16); + auto errAddr = QString::number((uint)excep->ExceptionRecord->ExceptionAddress, 16); + auto hDumpFile = CreateFile(L"c:/ledok-crash.dmp", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if(hDumpFile == INVALID_HANDLE_VALUE) { - qDebug()<<"handleException hDumpFile INVALID"<<"ExceptionCode"<palette(); + pal.setBrush(QPalette::Button, Qt::white); fdScale->setPalette(pal); fdScale->setAutoFillBackground(true); fdScale->setFixedWidth(32); @@ -98,7 +98,10 @@ PageEditor::PageEditor(QWidget *parent) : QWidget(parent) { vBox->addWidget(toolBar); graphicsView = new QGraphicsView(this); - graphicsView->setStyleSheet("QGraphicsView{background-color:transparent;}"); + pal = graphicsView->palette(); + pal.setBrush(QPalette::Base, QColor(0xbbbbbb)); + graphicsView->setAutoFillBackground(true); + graphicsView->setPalette(pal); vBox->addWidget(graphicsView); } diff --git a/LedOK/program/progeditorwin.cpp b/LedOK/program/progeditorwin.cpp index c768396..8c199dc 100644 --- a/LedOK/program/progeditorwin.cpp +++ b/LedOK/program/progeditorwin.cpp @@ -43,9 +43,6 @@ ProgEditorWin::ProgEditorWin(ProgItem *progItem, QWidget *parent) : QDialog(pare setAttribute(Qt::WA_AlwaysShowToolTips); if(parent && ! parent->isMaximized()) resize(parent->size()); else resize(1280, 720); -// auto plt = palette(); -// plt.setBrush(QPalette::Window, QColor(0xdddddd)); -// setPalette(plt); setWindowTitle(progItem->mName); auto vBox = new QVBoxLayout(this); @@ -360,7 +357,7 @@ ProgEditorWin::ProgEditorWin(ProgItem *progItem, QWidget *parent) : QDialog(pare vBoxPage->setContentsMargins(0, 0, 0, 0); vBoxPage->setSpacing(0); auto lbName = new QLabel(tr("program")); - lbName->setStyleSheet("QLabel{background-color: #bbbbbb;}"); + lbName->setStyleSheet("QLabel{background-color: #bbb;}"); lbName->setAlignment(Qt::AlignCenter); vBoxPage->addWidget(lbName); @@ -509,12 +506,6 @@ ProgEditorWin::ProgEditorWin(ProgItem *progItem, QWidget *parent) : QDialog(pare vBox->addLayout(hBox); - QGraphicsDropShadowEffect *shadow_effect = new QGraphicsDropShadowEffect(progEditorMid); - shadow_effect->setOffset(0, 0); - shadow_effect->setColor(QColor(38, 78, 119, 127));//阴影颜色 - shadow_effect->setBlurRadius(8);//阴影半径 - progEditorMid->setGraphicsEffect(shadow_effect); - QDir progQDir(mProgItem->mProgDir); if(progQDir.exists()) { QStringList pageNames = progQDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks);