本文整理汇总了C++中QListView::selectedItem方法的典型用法代码示例。如果您正苦于以下问题:C++ QListView::selectedItem方法的具体用法?C++ QListView::selectedItem怎么用?C++ QListView::selectedItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QListView
的用法示例。
在下文中一共展示了QListView::selectedItem方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotDownService
void kiptablesgenerator::slotDownService()
{
QListView* ports = (QListView*) namedWidgets["iPorts"];
QListViewItem *sel = ports->selectedItem(), *ibelow = 0;
if (sel)
ibelow=sel->itemBelow(); // Only check itemAbove() if it exists...
if (sel && ibelow)
sel->moveItem(ibelow); //Move the Item
}
示例2: slotUpService
void kiptablesgenerator::slotUpService()
{
QListView* ports = (QListView*) namedWidgets["iPorts"];
QListViewItem *sel = ports->selectedItem(), *iabove = 0;
if (sel)
iabove=sel->itemAbove(); // Only check itemAbove() if it exists...
if (sel && iabove)
iabove->moveItem(sel); //Move the Item
}
示例3: slotDelHost
void kiptablesgenerator::slotDelHost()
{
QListView* hosts = (QListView*) namedWidgets["hostsList"];
QListViewItem *sel = hosts->selectedItem();
if (sel) delete sel;
}
示例4: slotDelForward
void kiptablesgenerator::slotDelForward()
{
QListView* forwards = (QListView*) namedWidgets["forwardsList"];
QListViewItem *sel = forwards->selectedItem();
if (sel) delete sel;
}
示例5: slotDelService
void kiptablesgenerator::slotDelService()
{
QListView* ports = (QListView*) namedWidgets["iPorts"];
QListViewItem *sel = ports->selectedItem();
if (sel) delete sel;
}