Results 1 to 5 of 5

Thread: QWidget inside Q3WidgetStack - Not able to load the widget

  1. #1
    Join Date
    Jun 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default QWidget inside Q3WidgetStack - Not able to load the widget

    Hi,

    I am beginner in QT and i am facing a problem while i try to load a QGLWidget. I am using QWidget inside the Q3WidgetStack.
    I have already loaded one screen and it is working fine by calling the below described methods and raising the widget.
    Now when i am trying to load the second screen by having another Qwidget into the Q3WidgetStack and by calling in the same fashion i am not able to see the expected result.

    I am using the
    below mentioned QT commands
    user.currentGLWindow->addWidget(X,-1);
    user.currentGLWindow->raiseWidget(X);
    usetr.currentGLWindow->setVisible(true);

    i know that when i call the respective widget 3 functions gets called which is overridden as per application needs.
    i do not see them called at all. I have added some print functions to console to see if it is called.
    I do not see either InitialzeGL, resizeGL or paintGL being called.

    Kindly help me to come out of this situation

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QWidget inside Q3WidgetStack - Not able to load the widget

    Are you trying to port a Qt3 application to Qt 4? If not, you should be using QStackedWidget.

  3. #3
    Join Date
    Jun 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QWidget inside Q3WidgetStack - Not able to load the widget

    Hi,

    No i am not porting any QT Application.I am using a widget which was listed in the Qt3 support tab of the widget box.
    But i do not understand how does this make a difference even if i use a Qt3 support widgets.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QWidget inside Q3WidgetStack - Not able to load the widget

    It makes a difference because you are putting effort into learning the wrong API. That's your call though.

    So, what is the expected result you are not seeing, and what are you actually seeing? I am assuming, because you do not tell us exactly, that X is a QGLWidget*.

  5. #5
    Join Date
    Jun 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QWidget inside Q3WidgetStack - Not able to load the widget

    Hi,

    Yes u r right X is my QGLWidget instance and what i am not seeing is the print functions which ever i have added and the respective screen is not visible.


    Added after 8 minutes:


    Hi,

    You r right X is my QGLWidget instance,and what i am not able to see is my print functions in InitializeGL,resizeGL or in paintGL onto the console and moreover i do not see the respective screen.
    Last edited by ajithmak; 19th June 2012 at 13:43.

Similar Threads

  1. QWidget inside MFC project
    By hINTModuleState in forum Newbie
    Replies: 3
    Last Post: 9th October 2015, 15:22
  2. QLibrary load inside class
    By ^NyAw^ in forum Qt Programming
    Replies: 2
    Last Post: 14th February 2012, 09:43
  3. load table inside constructor
    By sattu in forum Qt Programming
    Replies: 0
    Last Post: 10th January 2011, 10:09
  4. How to load a Qwidget in groupBox at run time?
    By AviMittal in forum Qt Programming
    Replies: 8
    Last Post: 25th June 2009, 11:35
  5. running an app inside QWidget ?
    By drake1983 in forum Newbie
    Replies: 2
    Last Post: 14th March 2008, 15:33

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.