Experimental hacks with widget size
authorromashin
Sat, 19 Apr 2008 18:37:30 +0300
changeset 16802 db1c71ba7da8e48fe488bdc50fe8d4401ed9c157
parent 16801 e1c47edfd4f5f6dc4df9049c1ef0dc88ac0a0a72
child 16803 b4b41b917643a616f63618e2719dd6ecc8c157ab
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
milestone2.0a1pre
Experimental hacks with widget size
embedding/browser/qt/tests/TestQGeckoEmbed.cpp
embedding/browser/qt/tests/mainwindow.cpp
--- a/embedding/browser/qt/tests/TestQGeckoEmbed.cpp
+++ b/embedding/browser/qt/tests/TestQGeckoEmbed.cpp
@@ -33,17 +33,17 @@ int main(int argc, char **argv)
        *lastSlash = '\0';
 
     QGeckoEmbed::initialize(QDir::homePath().toUtf8(),
                             ".TestQGeckoEmbed", xpcomPath);
 
     MyMainWindow *mainWindow = new MyMainWindow();
     //app.setMainWidget(mainWindow);
 
-    mainWindow->resize(700, 500);
+    mainWindow->resize(400, 600);
     mainWindow->show();
 
     QString url;
     if (argc > 1)
         url = argv[1];
     else
         url = "http://www.kde.org";
 
--- a/embedding/browser/qt/tests/mainwindow.cpp
+++ b/embedding/browser/qt/tests/mainwindow.cpp
@@ -11,18 +11,19 @@
 #include "qgeckoembed.h"
 
 const QString rsrcPath = ":/images/lin";
 
 MyMainWindow::MyMainWindow()
 {
     QFrame *box = new QFrame(this);
     qecko = new QGeckoEmbed(box, "qgecko");
-    qecko->resize(500, 700); // FIXME
     box->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+    QHBoxLayout *hboxLayout = new QHBoxLayout(box);
+    hboxLayout->addWidget(qecko);
     setCentralWidget( box );
 
     QToolBar *toolbar = new QToolBar(this);
     toolbar->setWindowTitle("Location:");
     addToolBar(toolbar);
     setToolButtonStyle(Qt::ToolButtonTextOnly);
 
     QAction *action = new QAction(QIcon(rsrcPath + "/back.png"), tr( "Go Back"), toolbar);