Revision: 6161
Author: nogu.dev
Date: Thu Feb 25 14:55:26 2010
Log: * qt4/edittest/main.cpp
  - (main): Don't use Q3VBox, which is in Qt3Support module.
http://code.google.com/p/uim/source/detail?r=6161

Modified:
 /trunk/qt4/edittest/main.cpp

=======================================
--- /trunk/qt4/edittest/main.cpp        Tue Jan 20 18:11:15 2009
+++ /trunk/qt4/edittest/main.cpp        Thu Feb 25 14:55:26 2010
@@ -36,21 +36,31 @@
 #include <qlineedit.h>
 #include <qtextedit.h>
 #include <qsplitter.h>
-#include <Q3VBox>
 #include <qlabel.h>
+#include <QtGui/QVBoxLayout>

 int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     QSplitter page;

-    Q3VBox *linev = new Q3VBox(&page);
-    new QLabel("lineedit", linev);
-    new QLineEdit(linev);
-
-    Q3VBox *textv = new Q3VBox(&page);
-    new QLabel("textedit", textv);
-    new QTextEdit(textv);
+    QWidget *linev = new QWidget(&page);
+    QLabel *lineLabel = new QLabel("lineedit");
+    QLineEdit *lineEdit = new QLineEdit;
+
+    QVBoxLayout *lineLayout = new QVBoxLayout;
+    lineLayout->addWidget(lineLabel);
+    lineLayout->addWidget(lineEdit);
+    linev->setLayout(lineLayout);
+
+    QWidget *textv = new QWidget(&page);
+    QLabel *textLabel = new QLabel("textedit");
+    QTextEdit *textEdit = new QTextEdit;
+
+    QVBoxLayout *textLayout = new QVBoxLayout;
+    textLayout->addWidget(textLabel);
+    textLayout->addWidget(textEdit);
+    textv->setLayout(textLayout);

     app.setMainWidget(&page);
     page.show();

Reply via email to