Results 1 to 3 of 3

Thread: wanted to re-instantiate two classes from a class

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Location
    Finland /Pakistan
    Posts
    216
    Thanks
    20
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default wanted to re-instantiate two classes from a class

    Qt Code:
    1. #include "Progress.h"
    2. #include "TrainNavigation.h"
    3. ..
    4. TrainingUI::TrainingUI()
    5. {
    6.  
    7. progress = new Progress(this);
    8. progress->setGeometry(30,250,350,350);
    9.  
    10. navigate = new TrainNavigation(this);
    11. navigate->setGeometry(30,20,350,200);
    12.  
    13. }
    14.  
    15. void TrainingUI::resetTraining()
    16. {
    17. delete progress;
    18. delete navigate;
    19. // here i wanted to reinstate progress and navigate such that that it should be logical and efficient
    20. }
    To copy to clipboard, switch view to plain text mode 

    i tried to put the code in the constructor in a static member function and tried to call that function from constructor and resetTraining() ..but it didnt worked..any help...e
    Last edited by wysota; 22nd August 2008 at 10:09. Reason: missing [code] tags

Similar Threads

  1. class QHBoxLayout
    By csvivek in forum Installation and Deployment
    Replies: 2
    Last Post: 10th April 2008, 07:57
  2. How to use Signal through direct connection
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 14th December 2007, 07:07

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.