mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-03 11:00:53 +01:00
Add a new property to automatically detect HTML markup and display rich text in a text field .
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2066 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -202,7 +202,7 @@ void DiagramTextItem::focusInEvent(QFocusEvent *e) {
|
||||
setFlag(QGraphicsItem::ItemIsMovable, false);
|
||||
|
||||
// memorise le texte avant que l'utilisateur n'y touche
|
||||
previous_text_ = toPlainText();
|
||||
previous_text_ = toHtml();
|
||||
// cela permettra de determiner si l'utilisateur a modifie le texte a la fin de l'edition
|
||||
}
|
||||
|
||||
@@ -215,8 +215,8 @@ void DiagramTextItem::focusOutEvent(QFocusEvent *e) {
|
||||
|
||||
// signale la modification du texte si besoin
|
||||
if (toPlainText() != previous_text_) {
|
||||
emit(diagramTextChanged(this, previous_text_, toPlainText()));
|
||||
previous_text_ = toPlainText();
|
||||
emit(diagramTextChanged(this, previous_text_, toHtml()));
|
||||
previous_text_ = toHtml();
|
||||
}
|
||||
|
||||
// deselectionne le texte
|
||||
|
||||
Reference in New Issue
Block a user