Browse Source

fixed for qt5; removed i3 config requirements

tags/v1.0.0
Robin Thoni 7 years ago
parent
commit
74a78f7f84
4 changed files with 7 additions and 6 deletions
  1. 2
    2
      main.cpp
  2. 2
    1
      mainwidget.cpp
  3. 2
    2
      mainwidget.h
  4. 1
    1
      mainwidget.ui

+ 2
- 2
main.cpp View File

56
         }
56
         }
57
     }
57
     }
58
     qDebug() << "Geometry:" << w.geometry();
58
     qDebug() << "Geometry:" << w.geometry();
59
-    w.show();
59
+    w.exec();
60
 
60
 
61
-    return a.exec();
61
+    return 0;
62
 }
62
 }

+ 2
- 1
mainwidget.cpp View File

2
 #include "ui_mainwidget.h"
2
 #include "ui_mainwidget.h"
3
 
3
 
4
 MainWidget::MainWidget(QWidget *parent) :
4
 MainWidget::MainWidget(QWidget *parent) :
5
-    QWidget(parent),
5
+    QDialog(parent),
6
     ui(new Ui::MainWidget),
6
     ui(new Ui::MainWidget),
7
     exitOnLostFocus(false)
7
     exitOnLostFocus(false)
8
 {
8
 {
9
     ui->setupUi(this);
9
     ui->setupUi(this);
10
+    setWindowFlags( Qt::CustomizeWindowHint );
10
 }
11
 }
11
 
12
 
12
 MainWidget::~MainWidget()
13
 MainWidget::~MainWidget()

+ 2
- 2
mainwidget.h View File

1
 #ifndef MAINWIDGET_H
1
 #ifndef MAINWIDGET_H
2
 #define MAINWIDGET_H
2
 #define MAINWIDGET_H
3
 
3
 
4
-#include <QWidget>
4
+#include <QDialog>
5
 #include <QKeyEvent>
5
 #include <QKeyEvent>
6
 
6
 
7
 namespace Ui {
7
 namespace Ui {
8
 class MainWidget;
8
 class MainWidget;
9
 }
9
 }
10
 
10
 
11
-class MainWidget : public QWidget
11
+class MainWidget : public QDialog
12
 {
12
 {
13
     Q_OBJECT
13
     Q_OBJECT
14
 
14
 

+ 1
- 1
mainwidget.ui View File

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
 <ui version="4.0">
2
 <ui version="4.0">
3
  <class>MainWidget</class>
3
  <class>MainWidget</class>
4
- <widget class="QWidget" name="MainWidget">
4
+ <widget class="QDialog" name="MainWidget">
5
   <property name="geometry">
5
   <property name="geometry">
6
    <rect>
6
    <rect>
7
     <x>0</x>
7
     <x>0</x>

Loading…
Cancel
Save