QTP code written for IE generally cannot execute on Firefox without modifications because browsers have different DOM structures, object recognition patterns, and event handling. While some scripts may work with minor changes, significant modifications are often needed for compatibility.