thanks for you help<div>Now it work fine, was just the image path, but what is curious that it dont work begore, very strange.</div><div><br></div><div>[]'s<br><br><div class="gmail_quote">On Sat, Oct 23, 2010 at 5:00 AM, Vincent Vande Vyvre <span dir="ltr"><<a href="mailto:vincent.vandevyvre@swing.be">vincent.vandevyvre@swing.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


  
  

<div text="#000000" bgcolor="#ffffff">
Le 23/10/10 09:09, leo kirotawa a écrit :
<blockquote type="cite"><div><div></div><div class="h5"> Hi,
  <div><br>
  </div>
  <div>I  have the piece of code <br clear="all">
  <br>
  </div>
  <div><br>
  </div>
  <div>
  <div> view = QtGui.QGraphicsView(scene)</div>
  <div>   </div>
  <div>    view.setRenderHint(QtGui.QPainter.Antialiasing)</div>
  <div>    view.setRenderHint(QtGui.QPainter.Antialiasing)</div>
  <div>    pixmap = QtGui.QImage(":/images/background.jpg")</div>
  <div>    </div>
  <div>    view.setBackgroundBrush(QtGui.QBrush(pixmap))</div>
  <div>    view.setCacheMode(QtGui.QGraphicsView.CacheBackground)</div>
  <div><br>
  </div>
  <div>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?</div>
-- <br>
Leônidas S. Barbosa (Kirotawa)<br>
[DesenvolvedorWeb/CEFET/RN]<br>
[Ciências da Computação/UFRN]<br>
[pós-graduando em Inteligência Computacional/Processamento Gráfico /UFRN<br>
[Estudante de japonês nível Intermediário I  - Japanese Student]<br>
[Desenvolvedor em python, PyGame]<br>
blog nerd: <a href="http://corecode.wordpress.com/" target="_blank">corecode.wordpress.com/</a><br>
blog music: <a href="http://essenaomanja.blogspot.com" target="_blank">essenaomanja.blogspot.com</a>
  <div>blog tirinhas: <a href="http://elminiche.wordpress.com/" target="_blank">elminiche.wordpress.com/</a><br>
  <br>
"Mais sábio é aquele que sabe que não sabe" (Sócrates)<br>
  <br>
日本語の学生です。<br>
コンピュータサイエンスの学位.<br>
  </div>
  <br>
  </div>
  </div></div><pre><fieldset></fieldset>
_______________________________________________
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
</blockquote>
Hi,<br>
<br>
I have reproduce your code like this:<br>
<br>
class GraphicView(object):<br>
    def __init__(self, MainWindow):<br>
        MainWindow.resize(864, 649)<br>
        self.centralwidget = QtGui.QWidget(MainWindow)<br>
        self.gridLayout = QtGui.QGridLayout(self.centralwidget)<br>
        self.scene = QtGui.QGraphicsScene(self.centralwidget)<br>
        self.graphicsView = QtGui.QGraphicsView(self.scene)<br>
        self.graphicsView.setRenderHints(QtGui.QPainter.Antialiasing)<br>
        pixmap = QtGui.QImage("amymc1.jpg")   <br>
        self.graphicsView.setBackgroundBrush(QtGui.QBrush(pixmap))<br>
       
self.graphicsView.setCacheMode(QtGui.QGraphicsView.CacheBackground)<br>
        self.gridLayout.addWidget(self.graphicsView, 0, 0, 1, 1)<br>
        MainWindow.setCentralWidget(self.centralwidget)<br>
<br>
On Qt 4.6, PyQt 4.7.2<br>
and Qt 4.7, PyQt 4.7.4<br>
<br>
That functions but the result is unexpected.(See attachement)<br><font color="#888888">
<br>
<div>-- <br>
Vincent V.V.<br>
<a href="https://launchpad.net/oqapy" target="_blank">Oqapy</a></div>
</font></div>

<br>_______________________________________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br><br clear="all"><br>-- <br>Leônidas S. Barbosa (Kirotawa)<br>
[DesenvolvedorWeb/CEFET/RN]<br>[Ciências da Computação/UFRN]<br>[pós-graduando em Inteligência Computacional/Processamento Gráfico /UFRN<br>[Estudante de japonês nível Intermediário I  - Japanese Student]<br>[Desenvolvedor em python, PyGame]<br>
blog nerd: <a href="http://corecode.wordpress.com/" target="_blank">corecode.wordpress.com/</a><br>blog music: <a href="http://essenaomanja.blogspot.com" target="_blank">essenaomanja.blogspot.com</a><div>blog tirinhas: <a href="http://elminiche.wordpress.com/" target="_blank">elminiche.wordpress.com/</a><br>
<br>"Mais sábio é aquele que sabe que não sabe" (Sócrates)<br><br>日本語の学生です。<br>コンピュータサイエンスの学位.<br></div><br>
</div>