New answers tagged

12

Problem The <font> tag's size property is only defined for values of 1 through 7. MDN says about the <font> tag: Obsolete 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. and later: [...] For any new web development, styling ...


2

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 '...


1

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 * @qgsfunction(args='auto', group='Testing') def dataset(table, feature, parent): output="" layer=QgsProject.instance()....


1

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.


0

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 ...


0

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.


1

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() == '...


1

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 ...


1

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)) || ' °' || CASE WHEN @grid_axis = 'x' THEN IF(@grid_number=0, ' ' , IF (@grid_number > 0, 'E' , 'W')) ELSE IF(@grid_number=0, ' ', IF (@grid_number > 0, 'N'...


1

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) lyt.atlas().setEnabled(True)


0

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 ...


Top 50 recent answers are included