fix:display dictionary info in the dictionary tab as html

This commit is contained in:
Xiao YiFang 2023-04-09 11:38:04 +08:00 committed by xiaoyifang
parent 15219eeb72
commit c2e2b3a849
2 changed files with 5 additions and 3 deletions

View file

@ -225,10 +225,12 @@ void OrderAndProps::describeDictionary( DictListWidget * lst, QModelIndex const
ui.dictionaryFileList->setPlainText( filenamesText );
QString const& descText = dict->getDescription();
QString descText = dict->getDescription();
if( !descText.isEmpty() && descText.compare( "NONE" ) != 0 )
{
ui.dictionaryDescription->setPlainText( descText );
//qtbug QTBUG-112020
descText.remove( QRegularExpression( R"(<link[^>]*>)", QRegularExpression::CaseInsensitiveOption ) );
ui.dictionaryDescription->setHtml( descText );
ui.dictionaryDescription->setVisible( true );
ui.dictionaryDescriptionLabel->setVisible( true );
ui.infoVerticalSpacer->changeSize( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum );

View file

@ -167,7 +167,7 @@
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="dictionaryDescription">
<widget class="QTextEdit" name="dictionaryDescription">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>