[vlc-devel] commit: Extensions/Qt: use a QTextBrowser instead of QTextEdit ( Jean-Philippe André )
git version control
git at videolan.org
Thu Jan 28 16:22:14 CET 2010
vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Thu Jan 28 16:12:26 2010 +0100| [f2104a376748cfeab4ac634dadfdd35917e2f105] | committer: Jean-Philippe André
Extensions/Qt: use a QTextBrowser instead of QTextEdit
Now you can click on URLs
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f2104a376748cfeab4ac634dadfdd35917e2f105
---
modules/gui/qt4/dialogs/extensions.cpp | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/modules/gui/qt4/dialogs/extensions.cpp b/modules/gui/qt4/dialogs/extensions.cpp
index d35cffe..e2da271 100644
--- a/modules/gui/qt4/dialogs/extensions.cpp
+++ b/modules/gui/qt4/dialogs/extensions.cpp
@@ -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;
More information about the vlc-devel
mailing list