<span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><div>The documentation for keyPressEvent for a QTextEdit says </div><div><br></div>This function is called with key event <i>e</i> when key presses occur. It handles PageUp, PageDown, Up, Down, Left, and Right, and ignores all other key presses.</span><div>
<font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></div><div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;">i guess that means if i want to react to a user pressing Enter they're not making it easy for me?</span></font></div>
<div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; ">i thought maybe i could handle the textChanged event and then grab the current state of the keyboard to see if Enter is pressed, but I don't even see a function to check the keyboard state. </span></div>
<div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;">so what's the best way to do this?</span></font></div><div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;">do I have to use QAction in some way?</span></font></div>
<div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></div><div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;">what i want to do specifically is create an edit box where pressing shift+enter works like pressing enter but pressing enter alone calls a function which clears the text, etc. just like how an AIM input box works.</span></font></div>
<div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></div><div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;">thanks.</span></font></div>
<div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></div><div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;"><br>
</span></font></div><div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></div><div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;"><br>
</span></font></div><div><font class="Apple-style-span" face="'Times New Roman'"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></div>