[PyQt] QGraphicsView.setBackgroundBrush don't work

leo kirotawa kirotawa at gmail.com
Sat Oct 23 08:09:56 BST 2010


 Hi,

I  have the piece of code


 view = QtGui.QGraphicsView(scene)

    view.setRenderHint(QtGui.QPainter.Antialiasing)
    view.setRenderHint(QtGui.QPainter.Antialiasing)
    pixmap = QtGui.QImage(":/images/background.jpg")

    view.setBackgroundBrush(QtGui.QBrush(pixmap))
    view.setCacheMode(QtGui.QGraphicsView.CacheBackground)

So my scene have 800 x 600 pixel, and my image too. When I try put the
background in view just show a view in white color with no image. What I 'm
doing wrong?
-- 
Leônidas S. Barbosa (Kirotawa)
[DesenvolvedorWeb/CEFET/RN]
[Ciências da Computação/UFRN]
[pós-graduando em Inteligência Computacional/Processamento Gráfico /UFRN
[Estudante de japonês nível Intermediário I  - Japanese Student]
[Desenvolvedor em python, PyGame]
blog nerd: corecode.wordpress.com/
blog music: essenaomanja.blogspot.com
blog tirinhas: elminiche.wordpress.com/

"Mais sábio é aquele que sabe que não sabe" (Sócrates)

日本語の学生です。
コンピュータサイエンスの学位.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101023/5f8b162c/attachment.html>


More information about the PyQt mailing list