[PyQt] Adding a new file/node to QFileSystemModel - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: [PyQt] Adding a new file/node to QFileSystemModel (/thread-39367.html) |
Adding a new file/node to QFileSystemModel - DrakeSoft - Feb-06-2023 The QFileSystemModel has methods to remove a file, remove a directory and create a directory. remove() rmdir() mkdir() I expected it would have an equivalent convenience function to create a file (I know I can just use open), but looking at the documentation I do not see anything. Am I missing something? RE: Adding a new file/node to QFileSystemModel - deanhystad - Feb-06-2023 I would not expect such a thing. Unlike remove, rmdir and mkdir, file creation requires you to specify a mode, and is usually associated with writing to the file. File creation is missing in the description of QFileSystemModel. Quote:Detailed Description |