If there was a shower involved, you would want to hard pipe it. Assuming the tub spout is deck mounted and anchored well, you might be able to use pex, but it probably isn't designed for it. Too many adapters, and you have an opening for a leak...I think I'd solder the connections there if possible.
If the tub is large, keep in mind that 1/2" pex (if that's what you used) is smaller inside than 1/2" copper, and it could limit the flow depending on the valve you select. 3/4" pex is only a little larger ID than 1/2" copper.