From 33af8415b29e428d926bb6e61f77e7faf91c4ff6 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 12 Mar 2009 00:53:37 +0100 Subject: Solved initial size problem! --- src/mainwindow.cpp | 12 ++++++++---- src/mainwindow.h | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e24f4cf7..1c515218 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -86,10 +86,6 @@ MainWindow::MainWindow() setCentralWidget(centralWidget); // setting size policies - QRect desktopRect = QApplication::desktop()->screenGeometry(); - QSize size = desktopRect.size() * 0.8; - setMinimumSize( size ); - setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); // connect signals and slots @@ -154,6 +150,14 @@ MainWindow::~MainWindow() } +QSize MainWindow::sizeHint() const +{ + QRect desktopRect = QApplication::desktop()->screenGeometry(); + QSize size = desktopRect.size() * 0.8; + return size; +} + + void MainWindow::setupActions() { KAction *a; diff --git a/src/mainwindow.h b/src/mainwindow.h index d620990e..0082a2c0 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -57,6 +57,7 @@ public: static KUrl guessUrlFromString(const QString &url); MainView *tabWidget() const; WebView *currentTab() const; + virtual QSize sizeHint() const; private: void setupActions(); -- cgit v1.2.1