mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +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();
|
QString info = dict->getDescription();
|
||||||
|
|
||||||
if( !info.isEmpty() && info.compare( "NONE" ) != 0 )
|
if( !info.isEmpty() && info.compare( "NONE" ) != 0 ) {
|
||||||
ui.infoLabel->setPlainText( info );
|
//qtbug QTBUG-112020
|
||||||
|
info.remove( QRegularExpression( R"(<link[^>]*>)", QRegularExpression::CaseInsensitiveOption ) );
|
||||||
|
ui.infoLabel->setHtml( info );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ui.infoLabel->clear();
|
ui.infoLabel->clear();
|
||||||
|
|
||||||
|
|
|
@ -176,16 +176,13 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPlainTextEdit" name="infoLabel">
|
<widget class="QTextEdit" name="infoLabel">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="horizontalScrollBarPolicy">
|
<property name="horizontalScrollBarPolicy">
|
||||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="undoRedoEnabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in a new issue