
Three bombs exploded, targeting a petrol station, a police station and the home of parliamentary speaker Agila Salah, a security source told BBC News.
Mr Salah said the attack appeared to be retaliation for recent Egyptian air strikes on Islamic State militants.
Egypt struck after the group killed 21 Egyptian Christians it had abducted.
Mr Salah put the death toll in the town of 25,000 people at 30.
Speaking to Saudi-owned TV channel Al-Arabiya, Mr Salah announced seven days of mourning for the bomb victims.
On Monday, the Egyptian air force bombed targets in the Islamist stronghold of Derna, killing between 40 and 50 people, according to Libyan air force commander Saqer al-Joroushi, whose pilots also took part in the strikes.
"I think this operation was revenge for what happened in Derna," Mr Salah said after the al-Qubbah attacks.
The kidnapped Egyptian workers, all Coptic Christians, were seized in separate incidents in December and January from the coastal town of Sirte in eastern Libya, which is under the control of Islamist groups.
IS described the Copts it killed as "crusaders".
Libya has been in chaos since 2011 and the overthrow of its then-leader, Col Muammar Gaddafi. Since then, numerous militia groups have battled for control.
It has two rival governments, one based in Tripoli and the other in Tobruk.
The eastern city of Benghazi - where the 2011 revolution began - is largely in the hands of militant fighters, some with links to al-Qaeda.
BBC/LY