One of the switches on my taranis qx7s recently broke, and when looking at replacement switches I found two alternatives; X9D and X10/X12. The X9D switches are much cheaper than the other, so my question is therefore: are the X9D and qx7s switches the same?
Technically speaking, the electrical functionality of all normally-open SPDT (single pole double throw) toggle switches are exactly the same; it's just a matter of the physical dimensions of the part. The important dimensions for matching RC TXs with toggle switches are the diameter and pitch of the threads cut into the cylindrical section, but they're unlikely to differ between radios.
The kinds of SPDT toggle switches used in RC transmitters and like are so common and standardized that it's unlikely any manufacturer would go out and make their own instead of sourcing standard ones.
In regards to possible differences between FrSky Taranis QX7S and Taranis X9D switches, this RCGroups thread seems to indicate that they are interchangeable.
I don't have either product, so I can't speak from experience, but the primary plausible difference seems to be between an M6-0.75mm and an 1/4-40 (inch-TPI) thread on the switch. The replacement switches I've purchased for my own transmitters usually come with matching nuts, so I don't think the possible difference thread pitch is really a concern. M6 and 1/4 in diameters are pretty close in size, so I don't think that the diameter difference would pose much of an issue when sticking the new switch into the clearance hole in the transmitter housing.