Qtgui.py hide buttons

How can I modify /usr/lib64/python3.9/site-packages/psychopy/gui/qtgui.py ( class Dlg(QtWidgets.QDialog): ) to NOT show the OK and CANCEL buttons. The reason is because I am just using a single text entry box and pressing ENTER after typing in a value is sufficient but having the buttons will confuse. I am running in full screen and, as is known, mouse events don’t go to the dialog box.