Bug report #15920

Updated by Nathan Woodrow about 3 years ago

QGIS Layer Configuration includes information about edit widgets: edit widget type (Text Edit, Value Map, ...), constraints (Not null,...), editability, default values,...

When you "Save As Layer Definition file" you get a .qlr file with all this information.

But when you try to load this .qlr file ("Add from Layer Definition File"), all information about edit widgets is ignored, it is not restored.

By the way, when you save a QGIS project, you get a .qgs file, that also includes all this information. But opening the .qgs project do indeed correctly restores all edit widget information.

By opening both .qgs and .qlr files with a text editor, we have seen that they use the same schema format to describe all that information (under <maplayers><maplayer><edittypes><edittype><widgetv2config>). So it seems that processing this information should follow the same rules no matter if it is read from a QLR or a QGS file...