Assume build.properties file exists in the workspace directory after checking out, you may add a Misc/Script step after checkout step to execute below script:
groovy:
def props = new Properties()
new File(configuration.workspaceDir, "build.properties").withInputStream {
stream -> props.load(stream)
}
build.setVersion(props["version.major"] + "." + props["version.minor"] + "." + props["version.bugfix"] + "." + vars.get("iteration").increase());
Here variable "iteration" is defined as a configuration level variable with initial value set to 1.
The build version may be defined initially as "TBD", and it will be changed to the desired version by QuickBuild after running the script step.