Hello,
I have problem with QScrollArea in Designer.
The problem is that when I place QScrollArea on form it comes with QWidget (this is a container/viewport widget for widgets) and the problem with this is that I subclass this QScrollArea (I use "promote to" functionality - I have complex layout and it's easier for me to do it that way) and inside myQScrollArea constructor I setWidget( container ); but the problem with this is that in ui_classname.h I have after constructor setWidget(QWdiget) that erase widgets placed in my subclassed QScrollArea.
A "code" snippet describing situation
myqscrolarea:
this->setWidget( container ); <-- my Container with what I want in it
ui_classname:
myqscrolarea*scrollArea = new myqscrolarea(page);
scrollArea->setWidget(widget); <- "UI container" that override my Container
myqscrolarea:
QWidget *container = new QWidget();
this->setWidget( container ); <-- my Container with what I want in it
ui_classname:
myqscrolarea*scrollArea = new myqscrolarea(page);
QWidget *widget = new QWidget();
scrollArea->setWidget(widget); <- "UI container" that override my Container
To copy to clipboard, switch view to plain text mode
So I want to ask is there a way (and how to) to get ride of that QWidget added to QScrllArea by QDesigner? Because right now I need to //QWidget container on every UI recompile, or rewrite a lot of UI code, that I don't really want do (<- probably best solution).
Thanx in advance
Bookmarks