Hello everyone ,,
Thanks so much wysota for your replay ,,
If you draw anything outside paintEvent() it will be lost when something obscures your widget. Restrict drawing to paintEvent() only.
<<<this was my first problem ,, but the piece of code in my second replay sloves this problem (lossing data when another window come over the frame for writing )
to clearly describe my problem ,, here is a brief description of it :
I have a large project , but I have a problem in the interface ,, in my project I need a frame for writing on it ,, and and a button for erasing all what was written , and another button that acts as an eraser and of course a button for re-writing on the frame
The problem is 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 unhappy
for erasing all the frame I could use this peice of code and the prblem disappears , but I don't know how to do if I would only earase some of my drawing not every thing:
void TextFrame :: EraseAll()
{
CounterOfPoint = 0 ;
_buffer
= *(QWidget::erasePixmap ());
QWidget::setErasePixmap (_buffer
) ;
}
void TextFrame :: EraseAll()
{
CounterOfPoint = 0 ;
_buffer = *(QWidget::erasePixmap ());
QWidget::setErasePixmap (_buffer) ;
}
To copy to clipboard, switch view to plain text mode
could any one help me
Bookmarks