[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kcanvas/test
From:       Rob Buis <rwlbuis () xs4all ! nl>
Date:       2005-08-30 20:45:00
Message-ID: 1125434700.763286.14996.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 455234 by buis:

Some improvement, no warnings but just using the test will show painting problems, \
which are not apparent in canvastest.


 M  +8 -5      CanvasWidgetMultipleViews.cpp  


--- trunk/kdenonbeta/kcanvas/test/CanvasWidgetMultipleViews.cpp #455233:455234
@@ -64,13 +64,15 @@
 
 void CanvasWidget::setupGUI()
 {
+	KHBox *box = new KHBox(this);
+
 	// Initialize views & widgets...
 	m_firstView = new KCanvasView();
 	m_secondView = new KCanvasView();
-	
-	m_firstWidget = new HelperWidget(this, m_firstView);
-	m_secondWidget = new HelperWidget(this, m_secondView);
 
+	m_firstWidget = new HelperWidget(box, m_firstView);
+	m_secondWidget = new HelperWidget(box, m_secondView);
+
 	m_firstView->init(m_canvas, m_firstWidget);
 	m_secondView->init(m_canvas, m_secondWidget);
 
@@ -78,13 +80,13 @@
 	//	
 	// [----] [ViewOne] [----] [ViewTwo] [----]
 	//  50px    400px    50px    400px    50px
-	KHBox *box = new KHBox(this);
-
 	box->layout()->setSpacing(50);
 	box->layout()->addWidget(m_firstWidget);
 	box->layout()->setSpacing(50);
 	box->layout()->addWidget(m_secondWidget);
 	box->layout()->setSpacing(50);
+
+	setCentralWidget(box);
 }
 
 KCanvasView *CanvasWidget::firstView() const
@@ -102,6 +104,7 @@
 HelperWidget::HelperWidget(QWidget *parent, KCanvasView *view) : QWidget(parent, \
"HelperWidget", Qt::WNoAutoErase)  {
 	m_view = view;
+	setAttribute(Qt::WA_PaintOutsidePaintEvent);
 }
 
 HelperWidget::~HelperWidget()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic