Results 1 to 2 of 2

Thread: QStackedWidget Problem

  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Wink QStackedWidget Problem

    Dear Friends

    Qt Code:
    1. class COptWidget : public QWiget
    2. {
    3. Q_OBJECT
    4. public:
    5. COptWidget(SomeOtherClass *parent=0);
    6. ~COptWidget();
    7. };
    8.  
    9. COptWidget *plotopt = new COptWidget(pointerToSomeOtherClass);
    10. curPlot->addWidget(plotopt);
    11. curPlot->setCurrentWidget(plotopt);
    To copy to clipboard, switch view to plain text mode 

    But with this I am not able to see the plot what am I missing here. Application crashed at curPlot->addWidget(plotopt);
    Last edited by high_flyer; 28th April 2011 at 11:12. Reason: code tags

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QStackedWidget Problem

    try calling show() on your COptWidget.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. QStackedWidget and key events
    By lisarden in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 1st April 2011, 19:56
  2. problem with QStackedwidget
    By psantofe in forum Qt Programming
    Replies: 3
    Last Post: 14th April 2010, 12:41
  3. Help with QStackedWidget
    By onírico in forum Newbie
    Replies: 6
    Last Post: 12th November 2009, 16:34
  4. QStackedWidget layout problem
    By Banjo in forum Qt Programming
    Replies: 9
    Last Post: 15th May 2008, 00:15
  5. QStackedWidget fill Postscript image And scroll problem
    By patrik08 in forum Qt Programming
    Replies: 11
    Last Post: 22nd April 2007, 09:30

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.