本文整理汇总了C++中QVBox::setFocusProxy方法的典型用法代码示例。如果您正苦于以下问题:C++ QVBox::setFocusProxy方法的具体用法?C++ QVBox::setFocusProxy怎么用?C++ QVBox::setFocusProxy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QVBox
的用法示例。
在下文中一共展示了QVBox::setFocusProxy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setInstance
KHTMLImage::KHTMLImage( QWidget *parentWidget, const char *widgetName,
QObject *parent, const char *name )
: KParts::ReadOnlyPart( parent, name )
{
setInstance( KHTMLImageFactory::instance() );
QVBox *box = new QVBox( parentWidget, widgetName );
m_khtml = new KHTMLPart( box, widgetName, this, "htmlimagepart" );
m_khtml->setAutoloadImages( true );
setWidget( box );
// VBox can't take focus, so pass it on to sub-widget
box->setFocusProxy( m_khtml->widget() );
m_ext = new KHTMLImageBrowserExtension( this, "be" );
// Remove unnecessary actions.
KAction *encodingAction = actionCollection()->action( "setEncoding" );
if ( encodingAction )
{
encodingAction->unplugAll();
delete encodingAction;
}
KAction *viewSourceAction= actionCollection()->action( "viewDocumentSource" );
if ( viewSourceAction )
{
viewSourceAction->unplugAll();
delete viewSourceAction;
}
KAction *selectAllAction= actionCollection()->action( "selectAll" );
if ( selectAllAction )
{
selectAllAction->unplugAll();
delete selectAllAction;
}
connect( m_khtml->browserExtension(), SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ),
m_ext, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ) );
connect( m_khtml->browserExtension(), SIGNAL( enableAction( const char *, bool ) ),
m_ext, SIGNAL( enableAction( const char *, bool ) ) );
m_ext->setURLDropHandlingEnabled( true );
}