PDA

View Full Version : QStackedWidget question



hgedek
20th August 2007, 14:03
I created a stacked widget.I created 3 pages form designer.So desing side of these are finished..Now I will implement event functions for these pages.Each page has keyPressEvent and keyReleaseEvent.They have some functions.?
I thought to write 3 class for these pages but how will I combine these classes to these pages?

wysota
20th August 2007, 15:05
Event functions? Why do you need that? What do these pages contain?

hgedek
20th August 2007, 17:25
Three of them have graphicview and two ones have treewidgets.Using keypressevent I wanted to control them.

wysota
20th August 2007, 17:36
Don't you think you should inherit from the standard widgets and implement the events in those subclasses (you can promote the standard widgets to your subclasses in Designer if you want)? You can also try applying an event filter on those widgets or handle key presses in the stacked widget itself (just make sure it has a proper focus policy set to receive events at all).