1

I'm going through some PyQt4 GUI tutorials and often see strings such as "&File" or "&Exit" in menus and the like.

My question is what is the purpose of the "&" symbol in this string? I can't see a difference when I miss it out. I've not come across it in other Python tutorials - is it somehow unique to PyQt?

Thanks.

Ben
  • 6,687
  • 2
  • 33
  • 46
WMoreland
  • 78
  • 1
  • 5

1 Answers1

3

The & causes PyQT to display an underscore under the letter that serves as a shortcut key for the menu item.

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501