From 2f26f696ca6acd05aa615e15d891eede9907a1c0 Mon Sep 17 00:00:00 2001 From: drw Date: Tue, 29 Apr 2003 01:09:51 +0000 Subject: Now use QTextView for package information. This is for scroll through long package descriptions (e.g. OZ busybox). --- (limited to 'noncore/settings') diff --git a/noncore/settings/aqpkg/packagewin.cpp b/noncore/settings/aqpkg/packagewin.cpp index f00453e..7971ccc 100644 --- a/noncore/settings/aqpkg/packagewin.cpp +++ b/noncore/settings/aqpkg/packagewin.cpp @@ -32,15 +32,14 @@ #include -#include #include #include #include +#include PackageWindow::PackageWindow( Package *package, const QString &server ) : QWidget( 0, 0, 0 ) { - QVBoxLayout *layout = new QVBoxLayout( this, 4, 4 ); QString str; if ( package ) { @@ -101,12 +100,14 @@ PackageWindow::PackageWindow( Package *package, const QString &server ) setCaption( tr( "Package Information" ) ); str = tr( "Package information is unavailable" ); } - - QLabel *l = new QLabel( str, this ); - l->setTextFormat( Qt::RichText ); - l->setAlignment( Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak ); + + QVBoxLayout *layout = new QVBoxLayout( this, 4, 4 ); + + QTextView *l = new QTextView( str, QString::null, this ); + //l->setTextFormat( Qt::RichText ); + //l->setAlignment( Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak ); layout->addWidget( l ); - + QPushButton *btn = new QPushButton( Resource::loadPixmap( "enter" ), tr( "Close" ), this ); layout->addWidget( btn ); connect( btn, SIGNAL( clicked() ), this, SLOT( close() ) ); @@ -116,4 +117,3 @@ PackageWindow::PackageWindow( Package *package, const QString &server ) PackageWindow::~PackageWindow() { } - diff --git a/noncore/settings/aqpkg/packagewin.h b/noncore/settings/aqpkg/packagewin.h index c1943b5..b4fdcad 100644 --- a/noncore/settings/aqpkg/packagewin.h +++ b/noncore/settings/aqpkg/packagewin.h @@ -36,10 +36,10 @@ class Package; class PackageWindow :public QWidget { Q_OBJECT -public: +public: PackageWindow( Package * = 0x0, const QString & = QString::null ); ~PackageWindow(); }; -#endif \ No newline at end of file +#endif -- cgit v0.9.0.2