本文整理汇总了C++中QAction::statusTip方法的典型用法代码示例。如果您正苦于以下问题:C++ QAction::statusTip方法的具体用法?C++ QAction::statusTip怎么用?C++ QAction::statusTip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QAction
的用法示例。
在下文中一共展示了QAction::statusTip方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: statusTip
QString QActionProto::statusTip() const
{
QAction *item = qscriptvalue_cast<QAction*>(thisObject());
if (item)
return item->statusTip();
return QString();
}
示例2: if
DownloadQueue::Menu::Action DownloadQueue::Menu::exec(const DownloadQueue::SourceMap &sources, const QString &target, bool multiselect){
if (target.isEmpty() || sources.isEmpty() || !sources.contains(target))
return None;
arg = QVariant();
clearMenu(browse), clearMenu(send_pm), clearMenu(rem_src), clearMenu(rem_usr);
browse->setDisabled(multiselect);
send_pm->setDisabled(multiselect);
rem_src->setDisabled(multiselect);
rem_usr->setDisabled(multiselect);
QMap<QString, QString> users = sources[target];
auto it = users.constBegin();
for (; it != users.constEnd(); ++it){
QAction *act = new QAction(it.key(), menu);
act->setStatusTip(it.value());
browse->addAction(act);
send_pm->addAction(act);
rem_src->addAction(act);
rem_usr->addAction(act);
}
QAction *ret = menu->exec(QCursor::pos());
DownloadQueue::VarMap rmap;
if (!ret)
return None;
else if (map.contains(ret))
return map[ret];
else if (set_prio->actions().contains(ret)){
arg = ret->data();
return SetPriority;
}
rmap.insert(ret->text(), ret->statusTip());
arg = rmap;
if (browse->actions().contains(ret))
return Browse;
else if (send_pm->actions().contains(ret))
return SendPM;
else if (rem_src->actions().contains(ret))
return RemoveSource;
else if (rem_usr->actions().contains(ret))
return RemoveUser;
else
arg = QVariant();
return None;
}