<div dir="ltr">Thanks Vincent and David, that works for me!</div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-18 22:04 GMT+02:00 Vincent Vande Vyvre <span dir="ltr"><<a href="mailto:vincent.vande.vyvre@telenet.be" target="_blank">vincent.vande.vyvre@telenet.be</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
    <div>Le 18/05/2016 21:32, Daniel Krause a
      écrit :<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hello,
        <div><br>
        </div>
        <div>I have some problems to understand how to use QTableView.</div>
        <div><br>
        </div>
        <div>When I run this code</div>
        <div><br>
        </div>
        <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
          <div>
            <div>if __name__ == '__main__':</div>
          </div>
          <div>
            <div>    import pandas</div>
          </div>
          <div>
            <div>    from PyQt5 import QtCore</div>
          </div>
          <div>
            <div>    from PyQt5.QtWidgets import QTableView</div>
          </div>
          <div>
            <div>    from PyQt5.QtGui import QGuiApplication</div>
          </div>
          <div>
            <div>    import sys</div>
          </div>
          <div>
            <div><br>
            </div>
          </div>
          <div>
            <div>    print('initialize app')</div>
          </div>
          <div>
            <div>    application = QGuiApplication(sys.argv)</div>
          </div>
          <div>
            <div>    print('initialize view')</div>
          </div>
          <div>
            <div>    view = QTableView()</div>
          </div>
          <div>
            <div>    print(view)</div>
          </div>
          <div>
            <div>    print('do something else')</div>
          </div>
        </blockquote>
        <div>
          <div><br>
          </div>
        </div>
        <div>the execution of the script stops before </div>
        <div>
          <blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
            <div>
              <div>    print(view)</div>
              <div>    print('do something else')</div>
            </div>
          </blockquote>
          <br>
        </div>
        <div>What am I missing?</div>
        <div><br>
        </div>
        <div>Thanks for any hints,</div>
        <div>Daniel</div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a>
<a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
    </blockquote>
    <br>
    I don't know anything with QtGui.QGuiQApplication but try with
    QtWidgets.QApplication<br>
    <br>
    import sys<br>
    from PyQt5.QtWidgets import QApplication, QTableView<br>
    app = QApplication([])<br>
    view = QTableView()<br>
    view.show()<br>
    sys.exit(app.exec_())<br>
  </div>

<br>_______________________________________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer" target="_blank">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br></div>