mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-04-25 22:19:58 +02:00
Diagram text item : set a parent widget for rich text editor
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3817 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -383,7 +383,10 @@ void DiagramTextItem::setHtmlText(const QString &txt) {
|
|||||||
*/
|
*/
|
||||||
void DiagramTextItem::edit() {
|
void DiagramTextItem::edit() {
|
||||||
//Open the HtmlEditor
|
//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 the in/out
|
||||||
connect(editor, SIGNAL(applyEditText(const QString &)), this, SLOT(setHtmlText(const QString &)));
|
connect(editor, SIGNAL(applyEditText(const QString &)), this, SLOT(setHtmlText(const QString &)));
|
||||||
// load the Html txt
|
// load the Html txt
|
||||||
|
|||||||
Reference in New Issue
Block a user