0.0.4 version
[ussd-widget] / ussd4all / src / qussd.cpp
index adaf7a1..8c39434 100644 (file)
@@ -30,18 +30,28 @@ class QUssd : public QMainWindow {
                        connect(actLandscape, SIGNAL(changed()), this, SLOT(setOrientation()));
                        connect(actAuto, SIGNAL(changed()), this, SLOT(setOrientation()));
 
-                       replyLabel = new QLabel(message);
+                       replyLabel = new QTextEdit(message);
                        replyLabel->setMinimumWidth(400);
-                       replyLabel->setMaximumHeight(100);
+                       replyLabel->setMinimumHeight(200);
                        replyLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
-
+//                     replyLabel->setWordWrap(true);
+//                     replyLabel->setReadOnly(true);
+                       replyLabel->setFrameStyle(QFrame::NoFrame);
+                       QPalette pal = palette();
+                       pal.setColor(QPalette::Base, Qt::transparent);
+                       replyLabel->setPalette(pal);
+//                     replyLabel->setTextBackgroundColor(Qt::black);
+                       replyLabel->setTextColor(Qt::white);
+                       replyLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
+                       
                        numberLabel = new QLabel("");
-                       replyLabel->setMinimumWidth(400);
-                       replyLabel->setMinimumHeight(150);
-                       replyLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+                       numberLabel->setMinimumWidth(400);
+                       numberLabel->setMaximumHeight(100);
+                       numberLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
 
                        indicationLayout = new QVBoxLayout;
                        indicationLayout->addWidget(numberLabel);
+
                        indicationLayout->addWidget(replyLabel);
 
                        padDel = new QPushButton("C");
@@ -334,7 +344,7 @@ class QUssd : public QMainWindow {
                        numberLabel->setText(QString("<p style=\"font-size: 30pt;\" align=\"center\">")+number+"</p>");
                }
 
-               QLabel *replyLabel;
+               QTextEdit *replyLabel;
                QLabel *numberLabel;
                QAction *actPortrait;
                QAction *actLandscape;