本文整理汇总了C++中KGuiItem::toolTip方法的典型用法代码示例。如果您正苦于以下问题:C++ KGuiItem::toolTip方法的具体用法?C++ KGuiItem::toolTip怎么用?C++ KGuiItem::toolTip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KGuiItem
的用法示例。
在下文中一共展示了KGuiItem::toolTip方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QObject
KAction::KAction( const KGuiItem& item, const KShortcut& cut,
const QObject* receiver, const char* slot,
KActionCollection* parent, const char* name )
: QObject( parent, name ), d(new KActionPrivate)
{
initPrivate( item.text(), cut, receiver, slot );
if( item.hasIcon() )
setIcon( item.iconName() );
setToolTip( item.toolTip() );
setWhatsThis( item.whatsThis() );
}
示例2: KexiView
KexiReportDesignView::KexiReportDesignView(QWidget *parent, KexiSourceSelector *s)
: KexiView(parent)
{
m_scrollArea = new QScrollArea(this);
layout()->addWidget(m_scrollArea);
m_sourceSelector = s;
m_reportDesigner = 0;
m_editCutAction = KStandardAction::cut(this);
m_editCutAction->setProperty("iconOnly", true);
m_editCopyAction = KStandardAction::copy(this);
m_editCopyAction->setProperty("iconOnly", true);
m_editPasteAction = KStandardAction::paste(this);
m_editPasteAction->setProperty("iconOnly", true);
const KGuiItem del = KStandardGuiItem::del();
m_editDeleteAction = new QAction(del.icon(), del.text(), this);
m_editDeleteAction->setObjectName("editdelete");
m_editDeleteAction->setToolTip(del.toolTip());
m_editDeleteAction->setWhatsThis(del.whatsThis());
m_editDeleteAction->setProperty("iconOnly", true);
m_sectionEdit = new QAction(i18n("Edit Sections"), this);
m_sectionEdit->setObjectName("sectionedit");
m_itemRaiseAction = new QAction(koIcon("arrow-up"), i18n("Raise"), this);
m_itemRaiseAction->setObjectName("itemraise");
m_itemLowerAction = new QAction(koIcon("arrow-down"), i18n("Lower"), this);
m_itemLowerAction->setObjectName("itemlower");
//parameterEdit = new QAction ( i18n ( "Parameter Editor" ), this );
//parameterEdit->setObjectName("parameteredit");
QList<QAction*> al;
QAction *sep = new QAction(QString(), this);
sep->setSeparator(true);
al << m_editCutAction << m_editCopyAction << m_editPasteAction << m_editDeleteAction << sep << m_sectionEdit << sep << m_itemLowerAction << m_itemRaiseAction;
setViewActions(al);
}