Geographic Information Systems Asked by arjan on January 20, 2021
I have a project in the QGIS Recent Projects list that doesn’t exist anymore, but it keeps being listed (greyed out and without thumbnail image). Is there any way to remove it from the list? Perhaps by manually editing a history file or something like that?
I’ve found a feature request for this, and a related discussion, but I’m wondering if there’s anything I can do now in QGIS 2.14.
Settings > Options > Advanced
:Make a solemn promise that you will be careful and click. Locate the UI
folder and find the recentProjects
. Here you will see an index of recent projects:
You can widen the Value column to see more details on your projects. Identify the project you want removed and note the folder number (eg. 2). Then in the Python Console, enter:
from qgis.PyQt.QtCore import QSettings
QSettings().remove('UI/recentProjects/2')
Restart QGIS and the project should be removed from the list.
To delete the entire Recent Projects list, you can enter the following in the Python Console:
from qgis.PyQt.QtCore import QSettings
QSettings().remove('UI/recentProjects')
Restart QGIS and you should see the list has cleared.
Correct answer by Joseph on January 20, 2021
In addition to Josephs answer I want to post here a pure Python solution to get information of all recent projects in the QGIS Python console. I asked this in a comment on Josephs answer and don't want to ask an extra question.
from PyQt4.QtCore import QSettings
for key in QSettings().allKeys():
if 'recentProjects' in key:
#if 'recentProjects' and 'title' in key: # if only the title is wanted
print key + ' - ' + QSettings().value(key)
Answered by Stefan on January 20, 2021
If you are using a Windows machine, the easiest way to clear projects from the list is to delete them from the registry with Regedit.
Hit Win+R and type "regedit", then navigate to:
HKEY_CURRENT_USERSoftwareQGISQGIS2UIrecentProjects
The recent projects key will have a subkey for each project and they will have names from 1 to 10 based on the order of when they were last opened (1 being most recent). You may wish to bookmark this key for later convenience (File Menu>Favorites>Add to Favorites) and you may wish to export the recent projects key too because Regedit has no undo function (right-click>Export, then select file name and location).
You can see the details for each project in their substring values (CRS, project path, preview image and title). From there it is a simple issue of deleting the keys for the projects you don't want. You could even copy one of these keys and configure the strings to point to a project and custom png preview image to add one if you wanted to.
One other note: Doing it this way doesn't delete any files. The project files and data files should be easy enough to find if you want to get rid of them as well but doing it this way will also leave the png preview images orphaned in an obscure data folder until the Earth crashes into the sun. If you want to get rid of them too, you you can find them in C:UsersUser folder.qgis2previewImages or comparable folder depending on your OS and configuration.
Happy Mapping!.
Answered by James on January 20, 2021
You could also try
Settings -> Options -> System -> QSettings -> Reset
which might reset the recent list.
Answered by GISLounge on January 20, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP