2

How can i insert a a symbol\operator "&" between the strings in python Qt QPushbutton

Apply_button = QtGui.QPushButton("Apply & Change")

i get the buttontext as

Apply Change

but the 'and &' symbol is missing

user2345
  • 537
  • 1
  • 5
  • 22

2 Answers2

4

& Works like shortcut on Qt, try using &&

shiroma
  • 65
  • 1
  • 4
1

If the text contains an ampersand (&), a shortcut will be created using the next character. To insert an actual ampersand, use &&.

MattDMo
  • 100,794
  • 21
  • 241
  • 231