PDA

View Full Version : QTabBar with each Tab has exactly the same set of objects.



michaelxxviii
15th January 2012, 10:54
Hi! I'm a beginner in QT and I am currently creating a Symbian application. I am through with the designing and some minor coding. My problem now is, I don't know how to Copy the same objects from my first tab to the other. The event is like this, when I clicked the "pBnewTab", the QTabWidget is supposed to create a new tab that has the same object as the first one. what i mean is, I want the same objects on all the tabs that will be generated.

I think I did it once, but the problem was the objects was not copied but moved. when i checked the previous tab, it no longer have any content in it. Can someone help me? At the very least please give me a hint. I'm just new in object-oriented programming and QT is the first ever Software Development Tool that i used.

wysota
15th January 2012, 11:34
Create a class that contains the contents of a single tab and then create a separate instance of this class for each tab.