3rd Earl of March (1731-). 4th Duke of Queensberry (1786-). His grandfather was William Douglas (1655-1705), 1st Earl of March, a brother of James Douglas (1662-1711), 2nd Duke of Queensberry, the father of Charles Douglas, 3rd Duke of Queensberry.
William Douglas was also known as Old Q.
According to the website of the National Portrait Gallery, Douglas was a "notorious gambler, rake and stud owner".1
Boswell visited the Earl of March, as he then was, in London on December 6, 1762. They probably met a few times at Lord Eglinton's as well, during Boswell's stay in London 1762-63, at least on July 9, 1763.