From kde-devel Sat Apr 29 19:40:49 2000 From: Werner Trobin Date: Sat, 29 Apr 2000 19:40:49 +0000 To: kde-devel Subject: Re: still cant get my paintevent!!! - More help needed. X-MARC-Message: https://marc.info/?l=kde-devel&m=95703745420106 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------2A38EBEBD140EE6EBA53961E" Dies ist eine mehrteilige Nachricht im MIME-Format. --------------2A38EBEBD140EE6EBA53961E Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit "Jesper K. Pedersen" wrote: > > Daniel Schmitt writes: > > | Hi, > | > | Jesper Pedersen wrote: Hi! I'm wondering if that compiled for you. Unless I added a few lines (have a look at the attached diffs) it even failed to compile. BTW: Now it works (you get a repaintEvent on the initial show()). If the compilation aborts for you because of an missing test-widget.moc file, just create it via 'moc test-widget.h -o test-widget.moc' Have fun, Werner --------------2A38EBEBD140EE6EBA53961E Content-Type: text/plain; charset=us-ascii; name="test-widget.cpp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test-widget.cpp.diff" --- test-widget.cpp Sat Apr 29 21:19:16 2000 +++ ../koffice/KDE/qt-copy/tutorial/t1/test-widget.cpp Sat Apr 29 21:29:23 2000 @@ -14,7 +14,7 @@ QLabel *s = new QLabel(this); s->setText("label 2"); layout->addWidget(s); - + } void MyTestClass::paintEvent(QPaintEvent *) @@ -33,3 +33,4 @@ return myapp.exec(); } +#include "test-widget.moc" --------------2A38EBEBD140EE6EBA53961E Content-Type: text/plain; charset=us-ascii; name="test-widget.h.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test-widget.h.diff" --- test-widget.h Sat Apr 29 21:19:18 2000 +++ ../koffice/KDE/qt-copy/tutorial/t1/test-widget.h Sat Apr 29 21:30:52 2000 @@ -1,3 +1,6 @@ +#ifndef test_widget_h +#define test_widget_h + #include #include @@ -10,3 +13,4 @@ MyTestClass(QWidget *parent = 0); void paintEvent(QPaintEvent *event); }; +#endif --------------2A38EBEBD140EE6EBA53961E--