Qualcomm Inc on Tuesday won a major victory in its wide-ranging legal dispute with Apple Inc as the companies reached a surprise settlement that called for the iPhone to once again use Qualcomm modem chips.