When I am using the QGIS built-in formula to create a formula (for QField), I can use functions and access variables like
How can I access them using Qt Designer?
I want to display the current time and position within a label:
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
To do that, find the object name of the QLineEdit or QLabel. You can also set the object name on Qt Designer. For instance, if you want to set now() to an QLineEdit widget, use:
import datetime self.my_lineedit_objectname.setValue(datetime.datetime.now())`
If you want to set it to QLabel widget.
my_label_objectname with the actual object name in the UI file.
You can assign any variable in place of