Can you tell me what is the best way to port Q3ScrollView from qt3support library to…
- User
Can you tell me what is the best way to port Q3ScrollView from qt3support library to QScrollArea from Qt4 ?
- Assistant
- User
In this context how to manage in QScrollArea widgets that already have their own layout from ui file? With Q3ScrollView we're just setting parent of widget to q3scrollview ->viewport() how to properly manage it in Q3ScrollArea ?
- Assistant
- User
Can I do this during show event handling?
- Assistant
- User
Is it any other way to support window with widgets scrolling instead using QScrollArea? Widget is build with or without layout using ui file and when it's resized by window corner scroll bar should appear and scrolling should be possible
- Assistant
- User
how this method of custom window should be refactored to use QScrollArea or any other technique to manipulate of content void KFrame::makeShrinkable(bool isLocked, bool isAfakeDialogReplacementCase) { if (!qscrollview_) { setMinimumSize(QSize(0, 0)); if (statusbar_) delete statusbar_;
statusbar_ = new QStatusBar(this, "frame_footer"); statusbar_->setAutoFillBackground(true); qscrollview_ = new Q3ScrollView(this, "scroll_view"); qscrollview_->setHScrollBarMode(Q3ScrollView::Auto); qscrollview_->setVScrollBarMode(Q3ScrollView::Auto); qscrollview_->setResizePolicy(Q3ScrollView::Manual); // We want the Q3Scrollview to be totally transparent... // Replacing it by a QScrollArea would be better, but much more // expensive. qscrollview_->viewport()->setBackgroundColor( this->palette().color(this->backgroundRole())); QList<QWidget*> widgets = KGlobal::findDirectChildren<QWidget*>(this); Q_FOREACH (QWidget* obj, widgets) { if (!obj->inherits("Q3ScrollView") && !obj->inherits("QMenu") && !obj->inherits("KFrame")) { obj->setParent(qscrollview_->viewport()); } } if (!layout()) { QLayout* layout = new QVBoxLayout(this); layout->setContentsMargins(0,0,0,0); layout->setSpacing(0); } if(qscrollview_) layout()->add(qscrollview_); if (statusbar_) layout()->add(statusbar_); } //Do not uncomment this statment because we need the Frame to be no resizable //setMinimumSize(QSize(0,0)); - Assistant