It depends on when she applied. Originally, a vet could only get a pension if his disability was a direct result of his military service. A spouse could only inherit a pension if she was married to the vet at the time of his service. In the decades after the war the GAR was able to get the laws changed such that a vet could get a pension even if his disability wasn't the result of his service and any spouse could inherit such.
One was eventually eligible for a pension if one served for at least 90 days between 1861 and 1865 and received an honorable discharge.
So, if the widow was applying for a pension shortly after the war she'd only inherit if he got one due to his service and she was married to him while he was in service. If she didn't apply until, say, the 1890s then she'd definitely be eligible no matter when they married (assuming her husband actually was granted a pension).