Results 1 to 4 of 4

Thread: QStackedWidget question

  1. #1
    Join Date
    Jul 2007
    Posts
    104
    Thanks
    22
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QStackedWidget question

    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QStackedWidget question

    Event functions? Why do you need that? What do these pages contain?

  3. #3
    Join Date
    Jul 2007
    Posts
    104
    Thanks
    22
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QStackedWidget question

    Three of them have graphicview and two ones have treewidgets.Using keypressevent I wanted to control them.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QStackedWidget question

    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).

Similar Threads

  1. Replies: 4
    Last Post: 13th August 2007, 15:28
  2. Question regarding how to paint after zoom.
    By JonathanForQT4 in forum Qt Programming
    Replies: 2
    Last Post: 26th January 2007, 15:34
  3. parsing QtableWidget from a QStackedWidget
    By rosmarcha in forum Qt Programming
    Replies: 10
    Last Post: 13th October 2006, 14:36
  4. QThread exit()/quit() question
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 28th August 2006, 14:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.