aboutsummaryrefslogtreecommitdiff
path: root/plugins/ProfileEditor
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-05-15 14:26:47 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-05-15 14:26:47 +0200
commite412f035b054612d00fdbc39e13a958cf5492fec (patch)
tree438b806b4d1a53be6761dc91acedc988e489de01 /plugins/ProfileEditor
parentSet download tooltip image preview width to 400 (diff)
downloadsmolbote-e412f035b054612d00fdbc39e13a958cf5492fec.tar.xz
Profile editor plugin
Diffstat (limited to 'plugins/ProfileEditor')
-rw-r--r--plugins/ProfileEditor/forms/profileview.ui2
-rw-r--r--plugins/ProfileEditor/profileeditorplugin.cpp5
-rw-r--r--plugins/ProfileEditor/profileeditorplugin.h10
3 files changed, 8 insertions, 9 deletions
diff --git a/plugins/ProfileEditor/forms/profileview.ui b/plugins/ProfileEditor/forms/profileview.ui
index 2e43bae..b55bda8 100644
--- a/plugins/ProfileEditor/forms/profileview.ui
+++ b/plugins/ProfileEditor/forms/profileview.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ProfileView</class>
- <widget class="QWidget" name="ProfileView">
+ <widget class="QDialog" name="ProfileView">
<property name="geometry">
<rect>
<x>0</x>
diff --git a/plugins/ProfileEditor/profileeditorplugin.cpp b/plugins/ProfileEditor/profileeditorplugin.cpp
index d048875..7a92e51 100644
--- a/plugins/ProfileEditor/profileeditorplugin.cpp
+++ b/plugins/ProfileEditor/profileeditorplugin.cpp
@@ -9,10 +9,9 @@
#include "profileeditorplugin.h"
#include "forms/profileview.h"
-QWidget *ProfileEditorPlugin::createWidget(QWebEngineProfile *profile, QWidget *parent)
+QDialog *ProfileEditorPlugin::createWidget(QWebEngineProfile *profile, QWidget *parent)
{
auto *widget = new ProfileView(profile, parent);
- widget->setWindowFlags(Qt::ToolTip);
- widget->setVisible(false);
+ widget->setAttribute(Qt::WA_DeleteOnClose, true);
return widget;
}
diff --git a/plugins/ProfileEditor/profileeditorplugin.h b/plugins/ProfileEditor/profileeditorplugin.h
index 3999aba..899c51a 100644
--- a/plugins/ProfileEditor/profileeditorplugin.h
+++ b/plugins/ProfileEditor/profileeditorplugin.h
@@ -6,13 +6,13 @@
* SPDX-License-Identifier: GPL-3.0
*/
-#ifndef PROFILEEDITORPLUGIN_H
-#define PROFILEEDITORPLUGIN_H
+#ifndef PROFILEEDITOR_PLUGIN_H
+#define PROFILEEDITOR_PLUGIN_H
#include <interfaces.h>
class QWebEngineProfile;
-class QWidget;
+class QDialog;
class ProfileEditorPlugin : public QObject, public PluginInterface, public ProfileInterface
{
Q_OBJECT
@@ -23,7 +23,7 @@ public:
// PluginInterface
// ProfileInterface
- QWidget *createWidget(QWebEngineProfile *profile, QWidget *parent) override;
+ QDialog *createWidget(QWebEngineProfile *profile, QWidget *parent) override;
};
-#endif //PROFILEEDITORPLUGIN_H
+#endif //PROFILEEDITOR_PLUGIN_H