Hi,
I need to add a widget on a widgetstack (and work!) but I need it is 1/2 of widgetStack (insert from Designer)
MyWidget top (&w, "top");
top.
setGeometry(QRect(0,
0,w.
WidgetStack->width
()/2,w.
WidgetStack->height
()) );
int shared_top= w.WidgetStack->addWidget(&top);
cout << w.WidgetStack->width() << endl;
cout << w.WidgetStack->height() << endl;
MyWidget top (&w, "top");
top.setGeometry(QRect(0,0,w.WidgetStack->width()/2,w.WidgetStack->height()) );
int shared_top= w.WidgetStack->addWidget(&top);
cout << w.WidgetStack->width() << endl;
cout << w.WidgetStack->height() << endl;
To copy to clipboard, switch view to plain text mode
Why doesn't it work? (cout print 101 and 31 (why 31? Should be much more))
Thanks....
Bookmarks