The <font> tag's size property is only defined for values of 1 through 7. MDN says about the <font> tag:
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
[...] For any new web development, styling ...
As of QGIS 3.12, you can conditionally format row background and text colour in the attribute table in Layouts by setting the formatting in the Attribute Table for the layer in the main window.
So if you set up conditional formatting in the Attribute Table to "field" = 'value' this will be reflected in the attribute table in the map layout if you check '...
You can do by it writing a custom expression and put in a html- field. It is quite hard to make a general solution, but for a customized case, someting like this will work
from qgis.core import *
from qgis.gui import *
def dataset(table, feature, parent):
If you are trying to modify these rows you see as blue in the screenshot(?), I don't think it's currently change those based on a value:
I don't think it would be a really big development to make it possible to read an expression to the value like you can do with most of the inputs in the print layout. So I suggest you to open a feature request on GitHub.
If you want your main map and overview map to have two separate sets of visible layers, I would recommend using Map Themes (see official documentation here) and setting up two themes, one for your main map and one for the overview. This is a superior option, IMO, to the 'lock layers' option suggested in the answer to the linked question in the comments, as ...
Correctly the syntax should be:
<a href="url"> link_text </a>
In the QGIS layout, this syntax is ignored as there is no distinction between the url part and the link_text part. In fact if you type :
<a href> www.qgis.org</a>
it's the same thing, but it works.
You can use the following code to disable the Save Project button, just specify the name of the layout or report:
layouts = QgsProject.instance().layoutManager().layoutByName('reportOrLayoutName')
designer = iface.openLayoutDesigner(layouts)
layoutToolbar = designer.layoutToolbar()
for x in layoutToolbar.actions():
if x.objectName() == '...
Rotation of coordinate values is not possible in QGIS (as of the latest version so far, QGIS 3.12). There are only possible workarounds to get the final look as you want. Both of these mentioned methods require your manual input.
Make map rotation as per your requirement. Add grid, set X and Y
interval as per your need, and enable grid coordinates. Add text
Although the code provided by JGH works perfectly, here is a minor change to omit the suffix when dealing with 0°.
abs(format_number( @grid_number ,2))
|| ' °'
WHEN @grid_axis = 'x'
IF(@grid_number=0, ' ' , IF (@grid_number > 0, 'E' , 'W'))
IF(@grid_number=0, ' ', IF (@grid_number > 0, 'N'...
You have to search your layout (lyt) by name (lytname) in the layoutManager of the QgsProject instance, get the atlas and enable it :
lytname = "mep"
lyt = QgsProject.instance().layoutManager().layoutByName(lytname)
You can use a fixed scale for your project just going to Project Proprieties > General and add your scale (1:25000) to the Project Predefinited Scales. Leave this as only scale.
Now your Atlas, when you select the option Fixed Scale, your map will use just this scale.
Alternatively, still in Project Proprieties, in Variables, you can create a new variable ...