Qualcomm Inc on Tuesday won a major victory with a surprise settlement of its wide-ranging legal dispute with Apple Inc that includes a supply agreement paving the way for the iPhone to once again use Qualcomm modem chips including potentially for new 5G capability.