A virtue was a morally righteous quality.
In 2267, after Doctor Leonard McCoy bemoaned his failure at getting Eleen to want her baby, Spock said that "Virtue is a relative term." (TOS: "Friday's Child")
As the narrator of a modified version of Photons Be Free, Tom Paris reminded game players that patience is a virtue. (VOY: "Author, Author")