Commit f2104a37 authored by Jean-Philippe André's avatar Jean-Philippe André

Extensions/Qt: use a QTextBrowser instead of QTextEdit

Now you can click on URLs
parent 3534ae61
......@@ -32,7 +32,7 @@
#include <QLabel>
#include <QPixmap>
#include <QLineEdit>
#include <QTextEdit>
#include <QTextBrowser>
#include <QCheckBox>
#include <QListWidget>
#include <QComboBox>
......@@ -205,7 +205,7 @@ QWidget* ExtensionDialog::CreateWidget( extension_widget_t *p_widget )
{
QLabel *label = NULL;
QPushButton *button = NULL;
QTextEdit *textArea = NULL;
QTextBrowser *textArea = NULL;
QLineEdit *textInput = NULL;
QCheckBox *checkBox = NULL;
QComboBox *comboBox = NULL;
......@@ -242,9 +242,8 @@ QWidget* ExtensionDialog::CreateWidget( extension_widget_t *p_widget )
return label;
case EXTENSION_WIDGET_HTML:
textArea = new QTextEdit( this );
textArea->setAcceptRichText( true );
textArea->setReadOnly( true );
textArea = new QTextBrowser( this );
textArea->setOpenExternalLinks( true );
textArea->setHtml( qfu( p_widget->psz_text ) );
p_widget->p_sys_intf = textArea;
return textArea;
......@@ -547,7 +546,7 @@ QWidget* ExtensionDialog::UpdateWidget( extension_widget_t *p_widget )
{
QLabel *label = NULL;
QPushButton *button = NULL;
QTextEdit *textArea = NULL;
QTextBrowser *textArea = NULL;
QLineEdit *textInput = NULL;
QCheckBox *checkBox = NULL;
QComboBox *comboBox = NULL;
......@@ -578,7 +577,7 @@ QWidget* ExtensionDialog::UpdateWidget( extension_widget_t *p_widget )
return label;
case EXTENSION_WIDGET_HTML:
textArea = static_cast< QTextEdit* >( p_widget->p_sys_intf );
textArea = static_cast< QTextBrowser* >( p_widget->p_sys_intf );
textArea->setHtml( qfu( p_widget->psz_text ) );
return textArea;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment