ui 0.11 修改按钮颜色 增加help界面

This commit is contained in:
ZESl
2020-04-25 15:23:26 +08:00
parent 6226f3f909
commit e53ea3e6b7
6 changed files with 95 additions and 6 deletions

15
Classes/Help.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include "Help.h"
Help::Help(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
// QTextCodec *codec = QTextCodec::codecForName("utf-8"); //不起作用
// QTextCodec::setCodecForLocale(codec);
ui.textBrowser->setText(QString::fromUtf8("help")); // 暂时不能写显示中文
}
Help::~Help()
{
}

17
Classes/Help.h Normal file
View File

@@ -0,0 +1,17 @@
#pragma once
#include <QWidget>
#include "ui_Help.h"
#include <QTextCodec>
class Help : public QWidget
{
Q_OBJECT
public:
Help(QWidget *parent = Q_NULLPTR);
~Help();
private:
Ui::Help ui;
};

View File

@@ -48,8 +48,8 @@ void Reconstruction::setPicStyle()
void Reconstruction::setButtonStyle()
{
QString buttonStyle = "QPushButton{background-color:white;color: black;}"
"QPushButton:hover{background-color:#cceeff; color: black;}"
"QPushButton:pressed{background-color:rgb(85, 170, 255);border - style: inset; }";
"QPushButton:hover{background-color:#e5ebfb; color: black;}"
"QPushButton:pressed{background-color:rgb(204,213,240);border - style: inset; }";
ui.pushButton->setStyleSheet(buttonStyle);
ui.pushButton_2->setStyleSheet(buttonStyle);
ui.pushButton_3->setStyleSheet(buttonStyle);
@@ -359,4 +359,11 @@ void Reconstruction::on_pushButton_16_clicked()
// todo 颜色选取框已选择颜色color接下来对color进行处理
}
}
// 帮助
void Reconstruction::on_pushButton_18_clicked()
{
Help* help = new Help();
help->show();
}
#pragma endregion

View File

@@ -16,6 +16,7 @@
#include <vtkRenderWindow.h>
#include <QProgressDialog>
#include "MyThread.h"
#include "Help.h"
using namespace pcl;
using namespace std;
@@ -60,6 +61,7 @@ private slots:
void on_pushButton_15_clicked();
void on_pushButton_16_clicked();
void on_pushButton_17_clicked();
void on_pushButton_18_clicked();
void setPicAction(QString action);
void setCloud();
};