[Qt-creator] Drawing on QWidget

Adrian Łubik adrian5632 at gmail.com
Sun Jul 5 20:48:18 CEST 2009


Umm... Why don't you just use the QLabel widget and its setPixmap() method?

2009/7/5 Alex Williams <linuxfpga at gmail.com>

> Hello!
> I have Qt Creator 1.2
> I placed QWidget to form in deisgner. It scaled by layouts.
>
> Then, I have QPixmap. I drawing into QPixmap when pressing on button.
>
> Now I want just draw contents of pixmap into QWidget surface right
> when I pressing button.
>
> 1) how to copy QPixmap to QWidget on button click
> 2) if (1) is not possible, how to override paintEvent of QWidget
> created by designer? I cant find any way to do that
>
> And again: just draw QPixmap to any widget...
>
> Since my search on internet, I found that this is a mega huge problem
> of Qt, many many programmers can't find answer on this simple
> question... All exmaples is applied to self coded wisgets, but not
> created by designer, so any examples with paintEvent is not
> applicable... I spent 4 days on this problem!..
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090705/64ae043c/attachment.html 


More information about the Qt-creator-old mailing list