<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 18/05/2016 21:32, Daniel Krause a
      écrit :<br>
    </div>
    <blockquote
cite="mid:CAMiLiKh41e99Wg8GuYaXZVztw+W=ZvzVSviH_xYy4UJ4B3mqmg@mail.gmail.com"
      type="cite">
      <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 class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
PyQt mailing list    <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt">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>
  </body>
</html>