Results 1 to 4 of 4

Thread: Creating And Destoying composite Widgets

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Creating And Destoying composite Widgets

    hello, i'm trying to build an application which can dynamically load and destroy pages with in the app. but I'm having problems rendering loaded pages properly.

    i have attached some screen shots to show what i mean.

    i first open the application which has the page loaded in the middle with some tab widgets and lineeditors and a tableView. then i press the delete page button which destroys the widget containing all the aforementioned parts and then i press add page which is meant to create the page again in memory, but i now does not render the page properly. I've done this in pyqt and this it the code for the add page function and delete page function.

    Qt Code:
    1. def SearchAndAddCustomer(self):
    2. //this is the new object from the class which creates the search customer widget and all its contents
    3. self.SearchAndAdd = customerSearch(self)
    4. // this is the widget which holds the search customer widget on the main app back (the dark grey area) which is a Stacked widget called doubleContent
    5. self.mainApplicationStack = centralHolder2(self)
    6. // layout onto the dark grey area
    7. self.mainApplicationStackLayout = QGridLayout (self.mainApplicationStack.centralCanvas)
    8.  
    9. self.mainApplicationStackLayout.addWidget(self.SearchAndAdd)
    10. self.mainApplicationStackLayout.setContentsMargins(0,0,0,0)
    11. self.mainApplicationStackLayout.setSpacing(0)
    12. //add the pages to the stack widget
    13. self.doubleContent.insertWidget(0,self.mainApplicationStack)
    14.  
    15.  
    16. def SearchAndAddCustomerDelete(self):
    17. self.SearchAndAdd.destroy()
    18. self.doubleContent.removeWidget(self.mainApplicationStack)
    19. self.mainApplicationStack.destroy()
    To copy to clipboard, switch view to plain text mode 

    how can i render a page properly which is not in memory at the start of the application?
    I'm i missing some thing?
    you input on this will be very grateful
    Attached Images Attached Images
    Last edited by morraine; 30th August 2008 at 10:53.

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.