postbeerliu
4th September 2006, 04:13
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 ?
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 ?