QPainter::begin: Paint device returned engine == 0, type: 1
dev/QT 2012/04/24 16:56 |http://qt-project.org/doc/qt-4.8/qpainter.html
warn 으로 검색해보면 아래와 같은 구문이 있다.
Warning: When the paintdevice is a widget, QPainter can only be used inside a paintEvent() function or in a function called by paintEvent(); that is unless the Qt::WA_PaintOutsidePaintEvent widget attribute is set. On Mac OS X and Windows, you can only paint in a paintEvent() function regardless of this attribute's setting.
paintEvent 밖에서 위젯에 paint 를 하려면 설정 변경이 필요한것 같다.
정확한 확인은 시간이 나면 테스트후 추가.
ps1.
위 플래그는 윈도우, 맥, 리눅스에서는 지원되지 않는다고 나와 있다.
paint 이벤트 안에서만 QPainter 를 생성 가능하므로 위젯을 상속해서 이벤트 재정의를 통해서만 그리기가 가능한것 같다.
'dev > QT' 카테고리의 다른 글
| QPainter::begin: Paint device returned engine == 0, type: 1 (0) | 2012/04/24 |
|---|---|
| install Qt in Mac (0) | 2012/04/17 |
| Qt IN USE (0) | 2012/03/30 |
| qt setting (0) | 2012/03/29 |
| qBound (0) | 2012/02/08 |
| QT video tutorial (0) | 2012/01/04 |
QT_setting_kofmania.xml
댓글을 달아 주세요