I make a script that in which i have lineedit and tool button . Button act as a backspace .Whenever a user click on button it will remove one letter from the lineedit .
Now i want that if i keep pressing (without releasing button) than it should keep removing single letter by letter text in line edit ( just like as we hold backspace on line edit it will remove letter one by one) .
I tried QKeyEvent and it do it one time and every time i need to press button to remove one letter .
Any
Q*Buttonclass has this feature built-in. It’s calledautoRepeat. By default, this is disabled. But if you enable it, the button will fireclicked(and similar signals) continuously with certain intervals as long as it remains pressed.You can fine tune the behavior with
autoRepeatDelayandautoRepeatInterval.