By Rex Crum The tech sector edged lower Tuesday, but Hewlett-Packard Co. managed to hold on to a small gain as the world's largest technology company is set to deliver its second-quarter earnings report after the market close. Decliners included EMC Corp. (EMC), Seagate Technology (STX), Microsoft Corp. (MSFT), Dell Inc. (DELL) and Cisco Systems Inc. (CSCO). QAD Inc. (QADI) shares fell 58 cents, or more than 10%, to $5.13 after the maker of software for manufacturers gave a weaker-than-expected quarterly forecast. The company now expects to lose 4 cents to 5 cents a share on $50 million to $51 million in sales, down from earlier estimates of a profit of 3 cents a share on $54 million in revenue. H-P (HPQ) remained upbeat, rising 32 cents a share to $47.85. Analysts surveyed by FactSet Research estimate H-P will earn $1.06 a share on $29.86 billion in sales for its fiscal second quarter. The Nasdaq Composite Index (RIXF) stumbled, off by 8 points to 2,346. The Morgan Stanley High Tech 35 Index(MSH) and the Philadelphia Semiconductor Index (SOX) slipped into the red. Gains came from IBM Corp. (IBM), Apple Inc. (AAPL) and Research In Motion Ltd. (RIMM). RightNow Technologies Inc. (RNOW) rose 70 cents a share, or 4.6%, to $16.10 after FBR Capital Markets analyst David Hilal raised his rating on the software company to outperform from market perform. Hilal said that he expects RightNow to get more deals involving contact centers for businesses' customer service operations and sign more bookings in the coming months.