What's the use of setCornerWidget
Who can tell me the usage about "void QAbstractScrollArea::setCornerWidget ( QWidget * widget )"?
I just think that i can place a widget on the corner of the two scroolbar from the name of the method. So i create a graWidget and a navWidget which are all derived from QGraphicsView and derived form QAbstractScrollArea in chain .
graWidget = new GraphWidget( scene );
navWidget = new NavigateWidget( scene );
navWidget->setMainWindow(this);
graWidget->setCornerWidget(navWidget);
and I overload the void mousePressEvent ( QMouseEvent * e ) as void NavigateWidget::mousePressEvent ( QMouseEvent * e ), the the function I just send a message to the MainWindows' statusbar. but when i click on the corner ,nothing was show on the statusbar ? does i misuse the setcorner method ?
Re: What's the use of setCornerWidget
At first, Qt 4.2 is still at development stage. Maybe this has not yet been fully implemented. Are you using the tech preview or the latest snapshot anyway?
I have the feeling that the corner widget is intended to be something smaller than another scroll area. If I got it right, the "corner widget" will appear in the bottom right corner (in LTR layout) between the scroll bars. How does a widget with yet another scroll bars fit into that tiny area in between the scroll bars?
And notice what docs have to say about this:
Quote:
You will probably also want to set at least one of the scroll bar modes to AlwaysOn.
This will assure that the corner widget has some space to show itself.