Touch screen double tap directly jumps to next to next screen
I am developing Qt application (Qt version 4.7.3) on SBC6000x board. I am using tslib for touchscreen.
I have 2 screens with 2 buttons at same location. When a button on 1st screen is clicked(touched) it goes to 2nd screen. If I double tap button on 1st screen, it registers 2 touch events. With first touch it goes to 2nd screen and second touch is handled on 2nd screen and 3rd screen is displayed.
So with double tap on 1st screen I directly jump to 3rd screen. I want to prohibit this 2nd touch.
Here are the things I tried out.
I looked for changing debounce time in tslib but could not get enough information.
Disable buttons on 2nd screen, enable them when screen gets loaded.
Problem with 2nd approach: I not creating screens at runtime, I have an array of screens. If I enable buttons in show() method, I have to disable them somewhere. In what method I should disable them ?
While showing 2nd screen, I am not calling close() or hide() on 1st screen, I am calling only show() to 2nd screen. So I cannot disable buttons in closeEvent or hideEvent() (As I don't have these methods at all)
How do I handle this? any help is welcome.