Full compilable code would be nice.
Yes it is not related to Qt Designer.
The problem was once I write on the frame and erase it ( using QWidget::erase())
and another window come over my window ,, all what was erased before is draw on the frame
You paint _buffer in paintEvent. Then other window travels over the window then the window recieves paintEvent and your buffered image is drawn.
|
Source code
|
1
2
3
4
5
6
7
|
void TextFrame :: paintEvent(QPaintEvent*)
{
bitBlt(this , 0 , 0 , &_buffer) ;
// maybe better use
// bitBlt(this, 0, 0, &_buffer, e->rect());
}
|
QWidget::erase() does not erases the _buffer. "Erase" _buffer too or just erase _buffer and update the frame. For example.
|
Source code
|
1
2
3
4
5
6
|
bufferpainter.begin(&_buffer);
bufferpainter.setPen...
... other setup...
bufferpainter.fill...Something(...
bufferpainter.end();
this->update(x, y, w, h); // update (repaint) changed rectangle.
|
This post has been edited 1 times, last edit by "Messenger" (May 5th 2008, 7:40am)