[PyQt] Python generated file changes not detected by QFileSystemModel

Mads Ipsen madsipsen at gmail.com
Tue May 22 10:51:38 BST 2012


Hi,

Here's the problem:

 1. Set up a QFileSystemModel, call setRootPath() and hook up to the
    dataChanged signal.
 2. Open a new file from Python and write some text into it. Then close it.
 3. Reopen the file in append mode and write some more text into it.
    Then close it.
 4. Open a file in an external editor. Write some stuff. Save. Write
    more stuff. Save.

If you do (3), the dataChanged signal is NOT emitted. However, if you do 
(4), the dataChanged signal IS emitted.

Any clues? An attached file that reproduces the issue is attached.

Best regards,

Mads


-- 
+-----------------------------------------------------+
| Mads Ipsen                                          |
+----------------------+------------------------------+
| Gåsebæksvej 7, 4. tv |                              |
| DK-2500 Valby        | phone:          +45-29716388 |
| Denmark              | email:  mads.ipsen at gmail.com |
+----------------------+------------------------------+


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120522/21151be5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fsm-2.py
Type: text/x-python
Size: 1570 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120522/21151be5/attachment.py>


More information about the PyQt mailing list