From d53e4499f864719446abdb7fdeff433dbb3f7d98 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 27 May 2009 16:05:32 +1000 Subject: Remove qmlviewer's sizeHint hack. --- tools/qmlviewer/qmlviewer.cpp | 12 ------------ tools/qmlviewer/qmlviewer.h | 1 - 2 files changed, 13 deletions(-) diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 2ef5616..75a8f1c 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -163,18 +163,6 @@ QMenuBar *QmlViewer::menuBar() const return mb; } -QSize QmlViewer::sizeHint() const -{ - if (skin) - return QWidget::sizeHint(); - else { - // Kludge to force QMainWindow to be EXACTLY the right size for the canvas. - QSize sh = canvas->sizeHint(); - sh.setHeight(sh.height()+menuBar()->sizeHint().height()); - return sh; - } -} - void QmlViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) { QObject *parent = flatmenu ? (QObject*)flatmenu : (QObject*)menu; diff --git a/tools/qmlviewer/qmlviewer.h b/tools/qmlviewer/qmlviewer.h index 04d94cc..45ec446 100644 --- a/tools/qmlviewer/qmlviewer.h +++ b/tools/qmlviewer/qmlviewer.h @@ -44,7 +44,6 @@ public: void setCacheEnabled(bool); void addLibraryPath(const QString& lib); - QSize sizeHint() const; QMenuBar *menuBar() const; public slots: -- cgit v0.12