In the FAA's Instrument Procedures Handbook, it says to change altimeter settings while in the transition layer, which is almost always going to be between 17,000 and FL180 over here.
In your example, if you're climbing out of 12,000 and center says "For traffic, maintain one four thousand." If you've already set QNE, you may not have separation when you level out.