本文整理汇总了C++中QwtPlotCanvas::setWhatsThis方法的典型用法代码示例。如果您正苦于以下问题:C++ QwtPlotCanvas::setWhatsThis方法的具体用法?C++ QwtPlotCanvas::setWhatsThis怎么用?C++ QwtPlotCanvas::setWhatsThis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QwtPlotCanvas
的用法示例。
在下文中一共展示了QwtPlotCanvas::setWhatsThis方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QObject
CanvasPicker::CanvasPicker( QwtPlot *plot ):
QObject( plot ),
d_selectedCurve( NULL ),
d_selectedPoint( -1 )
{
QwtPlotCanvas *canvas = qobject_cast<QwtPlotCanvas *>( plot->canvas() );
canvas->installEventFilter( this );
// We want the focus, but no focus rect. The
// selected point will be highlighted instead.
canvas->setFocusPolicy( Qt::StrongFocus );
#ifndef QT_NO_CURSOR
canvas->setCursor( Qt::PointingHandCursor );
#endif
canvas->setFocusIndicator( QwtPlotCanvas::ItemFocusIndicator );
canvas->setFocus();
const char *text =
"All points can be moved using the left mouse button "
"or with these keys:\n\n"
"- Up:\t\tSelect next curve\n"
"- Down:\t\tSelect previous curve\n"
"- Left, ´-´:\tSelect next point\n"
"- Right, ´+´:\tSelect previous point\n"
"- 7, 8, 9, 4, 6, 1, 2, 3:\tMove selected point";
canvas->setWhatsThis( text );
shiftCurveCursor( true );
}