mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-04 06:38:39 +00:00
feat: adjust Dialog to Widget
This commit is contained in:
parent
51fa52accb
commit
ace268b4be
3 changed files with 8 additions and 8 deletions
|
@ -25,7 +25,7 @@ const QString &getKeyMapPath()
|
||||||
return s_keyMapPath;
|
return s_keyMapPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog)
|
Dialog::Dialog(QWidget *parent) : QWidget(parent), ui(new Ui::Widget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
initUI();
|
initUI();
|
||||||
|
@ -123,7 +123,7 @@ Dialog::~Dialog()
|
||||||
void Dialog::initUI()
|
void Dialog::initUI()
|
||||||
{
|
{
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
setWindowFlags(windowFlags() | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint);
|
//setWindowFlags(windowFlags() | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint);
|
||||||
|
|
||||||
setWindowTitle(Config::getInstance().getTitle());
|
setWindowTitle(Config::getInstance().getTitle());
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef DIALOG_H
|
#ifndef DIALOG_H
|
||||||
#define DIALOG_H
|
#define DIALOG_H
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QWidget>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
@ -14,11 +14,11 @@
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
class Dialog;
|
class Widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
class QYUVOpenGLWidget;
|
class QYUVOpenGLWidget;
|
||||||
class Dialog : public QDialog
|
class Dialog : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ protected:
|
||||||
void closeEvent(QCloseEvent *event);
|
void closeEvent(QCloseEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::Dialog *ui;
|
Ui::Widget *ui;
|
||||||
qsc::AdbProcess m_adb;
|
qsc::AdbProcess m_adb;
|
||||||
QSystemTrayIcon *m_hideIcon;
|
QSystemTrayIcon *m_hideIcon;
|
||||||
QMenu *m_menu;
|
QMenu *m_menu;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>Dialog</class>
|
<class>Widget</class>
|
||||||
<widget class="QDialog" name="Dialog">
|
<widget class="QWidget" name="Widget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue