feature:display dictionary description as html

This commit is contained in:
Xiao YiFang 2023-03-19 10:46:48 +08:00 committed by xiaoyifang
parent 8bfc0fee23
commit e4ccf1b378
2 changed files with 6 additions and 6 deletions

View file

@ -48,8 +48,11 @@ void DictInfo::showInfo( sptr<Dictionary::Class> dict )
QString info = dict->getDescription();
if( !info.isEmpty() && info.compare( "NONE" ) != 0 )
ui.infoLabel->setPlainText( info );
if( !info.isEmpty() && info.compare( "NONE" ) != 0 ) {
//qtbug QTBUG-112020
info.remove( QRegularExpression( R"(<link[^>]*>)", QRegularExpression::CaseInsensitiveOption ) );
ui.infoLabel->setHtml( info );
}
else
ui.infoLabel->clear();

View file

@ -176,16 +176,13 @@
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="infoLabel">
<widget class="QTextEdit" name="infoLabel">
<property name="toolTip">
<string notr="true"/>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="undoRedoEnabled">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>