From fa2fa7754233c270693a222375cd79594634ab23 Mon Sep 17 00:00:00 2001 From: tianduanrui <2407223896@qq.com> Date: Sat, 28 Oct 2017 17:36:32 +0800 Subject: [PATCH] update qqtframe3 --- examples/qqtframe3/mainwindow.cpp | 14 +++----- examples/qqtframe3/mainwindow.h | 11 ++---- examples/qqtframe3/mainwindow.ui | 59 ------------------------------- examples/qqtframe3/qqtframe3.pro | 3 +- 4 files changed, 9 insertions(+), 78 deletions(-) delete mode 100644 examples/qqtframe3/mainwindow.ui diff --git a/examples/qqtframe3/mainwindow.cpp b/examples/qqtframe3/mainwindow.cpp index d42a0ca7..150b7cf8 100644 --- a/examples/qqtframe3/mainwindow.cpp +++ b/examples/qqtframe3/mainwindow.cpp @@ -1,20 +1,16 @@ #include "mainwindow.h" -#include "ui_mainwindow.h" #include MainWindow::MainWindow(QWidget* parent) : - QMainWindow(parent), - ui(new Ui::MainWindow) + QDialog(parent) { - ui->setupUi(this); - - ui->w0->setMinValue(0); - //ui->widget->setMaxValue(100); - //ui->widget->setValue(80); + QQtCustomSpeedMeter* w0 = new QQtCustomSpeedMeter(this); + w0->setMinValue(0); + w0->setMaxValue(100); + w0->setValue(80); } MainWindow::~MainWindow() { - delete ui; } diff --git a/examples/qqtframe3/mainwindow.h b/examples/qqtframe3/mainwindow.h index a3948a91..0473a16e 100644 --- a/examples/qqtframe3/mainwindow.h +++ b/examples/qqtframe3/mainwindow.h @@ -1,22 +1,17 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include +#include -namespace Ui { -class MainWindow; -} - -class MainWindow : public QMainWindow +class MainWindow : public QDialog { Q_OBJECT public: - explicit MainWindow(QWidget *parent = 0); + explicit MainWindow(QWidget* parent = 0); ~MainWindow(); private: - Ui::MainWindow *ui; }; #endif // MAINWINDOW_H diff --git a/examples/qqtframe3/mainwindow.ui b/examples/qqtframe3/mainwindow.ui deleted file mode 100644 index d465abee..00000000 --- a/examples/qqtframe3/mainwindow.ui +++ /dev/null @@ -1,59 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 661 - 402 - - - - MainWindow - - - - - - 120 - 50 - 361 - 191 - - - - - - - - 0 - 0 - 661 - 28 - - - - - - TopToolBarArea - - - false - - - - - - - - QQtCustomSpeedMeter - QWidget -
qqtcustomspeedmeter.h
- 1 -
-
- - -
diff --git a/examples/qqtframe3/qqtframe3.pro b/examples/qqtframe3/qqtframe3.pro index aa4e1e2f..962b0100 100644 --- a/examples/qqtframe3/qqtframe3.pro +++ b/examples/qqtframe3/qqtframe3.pro @@ -67,5 +67,4 @@ SOURCES += \ HEADERS += \ mainwindow.h -FORMS += \ - mainwindow.ui +FORMS +=