pGraphicsScene는 QGraphicsScene의 인스턴스라고 가정.
//pGraphicsScene->setBackgroundBrush(QBrush(img)); 이 부분을~!
pGraphicsScene->setBackgroundBrush(QPixmap::fromImage(img)); //이렇게 수정
재정의된 QGraphicsScene의 데이터형에서 virtual function인 drawBackground에서 발견되었기에 여기서부터 문제를 확인했다.
setBackgroundBrush에서 img (QImage의 인스턴스)를 넣은부분에 대해서 호출안하거나, 혹은 다른 방법으로 색상을 넣어그려보니 이상이없었던점을 확인.
img는 QImage의 인스턴스인데, 이 img는 따로 들고 있던 데이터가 담겨져있어서 그 img에 넣어서 사용중에, 멀티로 pGraphicsScene로 돌리니 에러가발생.
다시 setBackgroundBrush로 넘어와서 이미지를 디스플레이해야하기때문에, pixmap을 통해서 background에 적용했다. 결과는 정상동작하게되었다.
'프로그래밍 > 리서치결과' 카테고리의 다른 글
string to LPCWSTR (0) | 2013.09.26 |
---|---|
warning c4819 the file contains a character that cannot be represented in the current code page (0) | 2013.08.06 |
mfc 실행시 side-by-side 오류 (0) | 2013.03.11 |
sqlite Primary Key autoincrement (0) | 2013.02.26 |
[odbc 드라이버] 관리자 잘못된 커서 상태입니다 (0) | 2013.01.18 |