Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

QScrollArea deleting issue

$
0
0
Hello! Basically I am using a QScrollArea for a list of labels that change when user presses a button. Now I need to delete all the items in the QScrollArea::widget() before I set a new Widget for the scrollarea… Problem is when I close the area (when I return to the main application widget to be more precise) I want to delete the scrollarea. Tried with delete scrollArea; and with qDeleteAll(scrollArea->children()), and then deleting the scrollArea. In both cases my program crashes. I think this is because of my mistake of having the creation of the scrollArea inside of the widget class for which I want the scrollArea. If this is indeed the case, how can I set my widget from outside of the class? I tried the obvious way but that got me nowhere because my widget Class has a wait period before adding the layout, and after you set the widget to the scroll area you cannot modify the layout anymore. Any ideas? Thank you in advance. Qt 4.8.4 MSVC2008

Viewing all articles
Browse latest Browse all 18427

Trending Articles