Colonel Qaddafi tried to use a recent visit to the Libyan capital by a group of British lawmakers as a lever to edge Mrs. Thatcher toward restoration of the link. But the prime minister decided she did not like his methods - bartering Britons held in Libyan jails without charge.

Since the siege, six Britons have been detained in Tripoli. When the MPs turned up in Tripoli, they sought an interview with Qaddafi, hoping to secure the detainees' release. Five Libyans are in British jails on criminal charges. It was only when the MPs were about to leave for London that news came through of the release of two Britons.

Qaddafi let it be known that he would like a reciprocal gesture on Britain's part. But the Thatcher government swiftly indicated that no such gesture would be forthcoming. Britain's message was: Release the remaining four Britons, then we shall see. In any case, the British Foreign Office declared, there could be no barter trade in human beings.

In seeking to restore ties, Qaddafi hopes to increase the flow of Libyans entering Britain, which has been reduced to a trickle. Libyans wishing to study at British universities are being turned back.

As the two released Britons returned to London it was announced that Britain had approved the appointment of a Libyan to represent his country from Saudi Arabia's London embassy. This move, British officials say, was not a response to the release of the Britons.

The Thatcher government is taking something of a gamble by not responding directly to Qaddafi's ''goodwill'' gesture. There is still a large British community in Libya, and it could come under pressure if the colonel's mood turned sour.