mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
feature:display dictionary description as html
This commit is contained in:
parent
8bfc0fee23
commit
e4ccf1b378
|
@ -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();
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue