Generally, stock that is sold or acquired before the five-year holding period is up will lose QSBS qualification, but before you panic there is an alternative called section 1045 rollover. Section 1045 allows you to repurchase other QSBS with the gains on the sale of your prior QSBS without restarting your holding period.
In a merger the QSBS qualification and holding period will be maintained if if the merger is considered a tax-free stock transfer as (1) a section 351 stock exchange or (2) a section 368 reorganization.
What is section 351?
What is section 368?