Nothing appears in QScrollArea
The following code appears in a custom dialog constructor:
Code:
watcher = DWatcher(None, DProperties({'value':settings}))
scroller.setWidget(watcher)
layout.addWidget(scroller)
layout.addItem(layout2)
self.setLayout(layout)
When the dialog appears, there is nothing in the scrollarea. DWatcher has a layout after its constructor exits. If I simply add the DWatcher, it works just like it's supposed to, but it can be really big so I want it in a scrollarea. Any ideas how this might happen?
Re: Nothing appears in QScrollArea
From documentation:
Quote:
If the scroll area is visible when the widget is added, you must show() it explicitly.
Note that You must add the layout of widget before you call this function (setWidget()); if you add it later, the widget will not be visible - regardless of when you show() the scroll area. In this case, you can also not show() the widget later
Maybe the second line is your reason?