summaryrefslogtreecommitdiff
path: root/noncore/graphics/drawpad/drawpad.cpp
Side-by-side diff
Diffstat (limited to 'noncore/graphics/drawpad/drawpad.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/drawpad.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp
index d9d0ce0..c0f42d9 100644
--- a/noncore/graphics/drawpad/drawpad.cpp
+++ b/noncore/graphics/drawpad/drawpad.cpp
@@ -46,13 +46,12 @@
#include <qspinbox.h>
#include <qtoolbutton.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
using namespace Opie::Ui;
-using namespace Opie::Ui;
DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ )
: QMainWindow(parent, name, WStyle_ContextHelp)
{
// init members
connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)),
this, SLOT(slotAppMessage(const QCString&, const QByteArray&)) );
@@ -278,13 +277,16 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ )
QToolTip::add(m_pBrushColorToolButton, tr("Fill Color"));
m_pBrushColorToolButton->setPopup(brushColorPopupMenu);
m_pBrushColorToolButton->setPopupDelay(0);
changeBrushColor(Qt::white);
- finishStartup();
+ // delay the rest of the initialization and do it from within the mainloop
+ // if we don't do this, the widget layout may not be constructed upon
+ // and we will end up with a wrong QScrollview page size (Mickeyl)
+ QTimer::singleShot( 100, this, SLOT( finishStartup() ) );
}
void DrawPad::finishStartup()
{
// init pages