Skip to main content
deleted 51 characters in body
Source Link
ThomasG77
  • 31.2k
  • 1
  • 55
  • 95

Within QGIS Python console, get the ini file path from QSettings

settings = QSettings()
print(settings.fileName())

Then in your Python console, use path from above settings.fileName() like below

from PyQt5.QtCore import QSettings

settings = QSettings('/home/thomasg/.local/share/QGIS/QGIS3/profilesyour/try-outini/QGISpath/QGIS3.ini', QSettings.IniFormat)
# Now working
print(settings.allKeys())

Within QGIS Python console, get the ini file path from QSettings

settings = QSettings()
print(settings.fileName())

Then in your Python console, use path from above settings.fileName() like below

from PyQt5.QtCore import QSettings

settings = QSettings('/home/thomasg/.local/share/QGIS/QGIS3/profiles/try-out/QGIS/QGIS3.ini', QSettings.IniFormat)
# Now working
print(settings.allKeys())

Within QGIS Python console, get the ini file path from QSettings

settings = QSettings()
print(settings.fileName())

Then in your Python console, use path from above settings.fileName() like below

from PyQt5.QtCore import QSettings

settings = QSettings('/your/ini/path/ini', QSettings.IniFormat)
# Now working
print(settings.allKeys())
added 5 characters in body
Source Link
ThomasG77
  • 31.2k
  • 1
  • 55
  • 95

Within QGIS Python console, get the ini file path from QSettings

settings = QSettings()
print(settings.fileName())

Then in your Python console, use path from above settings.fileName() like below

from PyQt5.QtCore import QSettings

settings = QSettings('/home/thomasg/.local/share/QGIS/QGIS3/profiles/try-out/QGIS/QGIS3.ini', QSettings.IniFormat)
# Now working
print(settings.allKeys())

Within QGIS Python console, get the ini file from QSettings

settings = QSettings()
print(settings.fileName())

Then in your Python console, use path from above settings.fileName() like below

from PyQt5.QtCore import QSettings

settings = QSettings('/home/thomasg/.local/share/QGIS/QGIS3/profiles/try-out/QGIS/QGIS3.ini', QSettings.IniFormat)
# Now working
print(settings.allKeys())

Within QGIS Python console, get the ini file path from QSettings

settings = QSettings()
print(settings.fileName())

Then in your Python console, use path from above settings.fileName() like below

from PyQt5.QtCore import QSettings

settings = QSettings('/home/thomasg/.local/share/QGIS/QGIS3/profiles/try-out/QGIS/QGIS3.ini', QSettings.IniFormat)
# Now working
print(settings.allKeys())
Source Link
ThomasG77
  • 31.2k
  • 1
  • 55
  • 95

Within QGIS Python console, get the ini file from QSettings

settings = QSettings()
print(settings.fileName())

Then in your Python console, use path from above settings.fileName() like below

from PyQt5.QtCore import QSettings

settings = QSettings('/home/thomasg/.local/share/QGIS/QGIS3/profiles/try-out/QGIS/QGIS3.ini', QSettings.IniFormat)
# Now working
print(settings.allKeys())