PySide/tests/QtGui/bug_668.py
Hugo Parente Lima 7909d294f5 Fix bug 668 - "QFileSystemModel setRootPath stops application from quitting."
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2011-02-09 18:26:55 -02:00

21 lines
425 B
Python

# coding: utf-8
from PySide.QtCore import *
from PySide.QtGui import *
import sys
class A(QMainWindow):
def __init__(self, parent=None):
super(A, self).__init__(parent)
a = QFileSystemModel(self)
a.setRootPath(QDir.homePath())
v = QTreeView(self)
v.setModel(a)
self.setCentralWidget(v)
app = QApplication([])
m = A()
m.show()
QTimer.singleShot(0, m.close)
app.exec_()