|
|
|
@ -230,10 +230,8 @@ void UBTGAdaptableText::bottomMargin(int newValue) |
|
|
|
|
|
|
|
|
|
void UBTGAdaptableText::focusInEvent(QFocusEvent* e) |
|
|
|
|
{ |
|
|
|
|
qDebug() << "pippa"; |
|
|
|
|
if(isReadOnly()){ |
|
|
|
|
e->ignore(); |
|
|
|
|
qDebug() << "ignored"; |
|
|
|
|
} |
|
|
|
|
managePlaceholder(true); |
|
|
|
|
QTextEdit::focusInEvent(e); |
|
|
|
@ -247,7 +245,6 @@ void UBTGAdaptableText::focusOutEvent(QFocusEvent* e){ |
|
|
|
|
void UBTGAdaptableText::managePlaceholder(bool focus){ |
|
|
|
|
if(focus){ |
|
|
|
|
if(toPlainText() == mPlaceHolderText){ |
|
|
|
|
qDebug() << "Place holder found"; |
|
|
|
|
setTextColor(QColor(Qt::black)); |
|
|
|
|
setPlainText(""); |
|
|
|
|
} |
|
|
|
|