Refactor css file.
This commit is contained in:
@@ -38,7 +38,7 @@ LoginDialog::~LoginDialog()
|
||||
|
||||
void LoginDialog::initializeAllWidget()
|
||||
{
|
||||
this->setObjectName("loginform");
|
||||
this->setObjectName("loginForm");
|
||||
|
||||
initializeTitle();
|
||||
initializeDialogFrame();
|
||||
@@ -88,7 +88,7 @@ void LoginDialog::initializeTitle()
|
||||
|
||||
void LoginDialog::initializeDialogFrame()
|
||||
{
|
||||
mDialogFrame->setObjectName("login_frame_username");
|
||||
mDialogFrame->setObjectName("loginFrame");
|
||||
}
|
||||
|
||||
void LoginDialog::initializeEdit()
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
#include <QDockWidget>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include "ui_mainwindow.h"
|
||||
#include "ui_MainWindow.h"
|
||||
#include "event/EventCenter.h"
|
||||
#include "forms/tabformwidget.h"
|
||||
#include "forms/select/SelectFormWidget.h"
|
||||
@@ -434,3 +435,19 @@ void MainWindow::swipeTriggered(QSwipeGesture* aSwipeGesture)
|
||||
//update();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::keyPressEvent(QKeyEvent *event) {
|
||||
if (event->modifiers()==Qt::ControlModifier &&event->key()==Qt::Key_R){
|
||||
QFile file("D:\\workdir\\GUI\\src\\stylesheet\\Dark2.css");
|
||||
file.open(QFile::ReadOnly);
|
||||
if (file.isOpen())
|
||||
{
|
||||
QString styleSheet = this->styleSheet();
|
||||
styleSheet += QLatin1String(file.readAll());
|
||||
this->setStyleSheet(styleSheet);
|
||||
}
|
||||
this->update();
|
||||
}
|
||||
|
||||
QWidget::keyPressEvent(event);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ protected:
|
||||
void changeEvent(QEvent* aEvent);
|
||||
bool event(QEvent* aEvent) override;
|
||||
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
|
||||
private:
|
||||
void initializeTabWidget();
|
||||
void initializeLayout();
|
||||
|
||||
Reference in New Issue
Block a user