QField
QField copied to clipboard
Add support for top level groups
Describe the issue
Using Drag and Drop Designer, when group is top level, every group in the form are displayed as a tab. It makes it impossible to use groups without having another element first.
I'm not sure this is a bug a feature but I believe that groups should always look like groups. Is a tab is required, one can always use a tab instead.
This might be related to #1025.
Reproduction steps
Steps to reproduce the behavior:
- Create a form using Drag and Drop Designer
- Create a group and place on top
- Synchronize project with QField
- Check or add a feature
Expected behavior
Groups should look like groups no matter what.
Observed behavior
Groups are displayed as tabs.
Screenshots and GIFs
Group on top level in QGIS
Group shown as tab in QField
Group with another element on top level in QGIS
Group showing properly in QField
Desktop (please complete the following information)
- OS: Windows 11
- QGIS Version: 3.34.3
- QFieldSync Version: 4.7.1
Mobile (please complete the following information)
- Device: Pixel 7
- OS: Android 14
- QField version: 3.1.9 (f2829b)
Additional information
- Problem started happening recently, didn't happen in an older version of QField: I don't know
- Problem can be reliably reproduced, doesn't happen randomly: Yes
- Problem happens with all files and projects, not only some files or projects: I only tested different layers in the same project but I would say "Yes"
See also https://github.com/opengisch/QField/issues/1025 and https://github.com/opengisch/QField/issues/2044 which are also about top level elements and their interaction with tabs. For reference, this was consciously left out of the first implementation to reduce code complexity. If someone goes forward with this, please take the potential maintenance effort into consideration.
As a workaround, I was able to add a field like the fid on top level, set its name to a whitespace and its widget type to "Hidden". Apart from having a blank space on the top, the form shows as I want to.
Hopefully, someone with the required skills will be able to figure this out. But according to the other related issues, it seems that this bug has been around for a while.
As a workaround, I was able to add a field like the fid on top level, set its name to a whitespace and its widget type to "Hidden". Apart from having a blank space on the top, the form shows as I want to.
It seems you don't want to see the field. Why do you need to add it (on top level)?
Exactly, it's just some kind of placeholder! I want all the useful fields to be grouped. If I don't have this dummy field on top, groups are shown as tabs. It's dirty, but it works. :)