[qet] [3817] Diagram text item : set a parent widget for rich text editor |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3817
Author: blacksun
Date: 2015-03-11 22:18:05 +0100 (Wed, 11 Mar 2015)
Log Message:
-----------
Diagram text item : set a parent widget for rich text editor
Modified Paths:
--------------
trunk/sources/qetgraphicsitem/diagramtextitem.cpp
Modified: trunk/sources/qetgraphicsitem/diagramtextitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/diagramtextitem.cpp 2015-03-10 14:47:03 UTC (rev 3816)
+++ trunk/sources/qetgraphicsitem/diagramtextitem.cpp 2015-03-11 21:18:05 UTC (rev 3817)
@@ -383,7 +383,10 @@
*/
void DiagramTextItem::edit() {
//Open the HtmlEditor
- qdesigner_internal::RichTextEditorDialog *editor = new qdesigner_internal::RichTextEditorDialog();
+ QWidget *parent = nullptr;
+ if (scene() && scene()->views().size())
+ parent = scene()->views().first();
+ qdesigner_internal::RichTextEditorDialog *editor = new qdesigner_internal::RichTextEditorDialog(parent);
// connect the in/out
connect(editor, SIGNAL(applyEditText(const QString &)), this, SLOT(setHtmlText(const QString &)));
// load the Html txt