Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
1
vote
Getting readable message level of Qgis.MessageLevel
With pure Python, you can do introspection and create your own useful translator :
from qgis.core import Qgis
message_levels = {
getattr(Qgis, i): i for i in dir(Qgis)
if isinstance(getattr(Qgis … , i), Qgis.MessageLevel)
}
# {0: 'Info', 1: 'Warning', 2: 'Critical', 3: 'Success', 4: 'NoLevel'}
So, in your usecase :
from qgis.core import Qgis
level = Qgis.Info
print(message_levels[level])
# >>> …