本文整理汇总了C++中QListView::hide方法的典型用法代码示例。如果您正苦于以下问题:C++ QListView::hide方法的具体用法?C++ QListView::hide怎么用?C++ QListView::hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QListView
的用法示例。
在下文中一共展示了QListView::hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QWidget
CWirelessSettings::CWirelessSettings(CDevice * wireless, QWidget * parent) : QWidget(parent), m_Device(wireless) {
ui.setupUi(this);
QListView * hiddenListView = new QListView(this);
hiddenListView->hide();
hiddenListView->setViewMode(QListView::IconMode);
hiddenListView->setIconSize(QSize(24, 24));
hiddenListView->setGridSize(QSize(96, 64));
setWindowTitle(tr("QNUT - Wireless Settings for \"%1\"").arg(m_Device->getName()));
setWindowIcon(QIcon(UI_ICON_AP));
ui.nameLabel->setText(m_Device->getName());
m_ManagedAPProxyModel = new CManagedAPProxyModel(this);
m_ManagedAPModel = new CManagedAPModel(m_Device->getWireless()->getWpaSupplicant(), this);
m_ManagedAPProxyModel->setSourceModel(m_ManagedAPModel);
m_AvailableAPProxyModel = new CAvailableAPProxyModel(this);
m_AvailableAPModel = new CAvailableAPModel(m_Device->getWireless()->getHardware(), this);
m_AvailableAPProxyModel->setSourceModel(m_AvailableAPModel);
createActions();
ui.managedView->setModel(m_ManagedAPProxyModel);
ui.availableView->setModel(m_AvailableAPProxyModel);
ui.managedView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
ui.availableView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
updateUi(m_Device->getState());
ui.managedView->header()->setMinimumSectionSize(-1);
ui.availableView->header()->setMinimumSectionSize(-1);
connect(m_Device, &CDevice::stateChanged, this, &CWirelessSettings::updateUi);
connect(ui.managedView->selectionModel(), &QItemSelectionModel::selectionChanged,
this, &CWirelessSettings::handleManagedAPSelectionChanged);
connect(ui.availableView, &QAbstractItemView::doubleClicked, this, &CWirelessSettings::addNetwork);
connect(ui.managedView, &QAbstractItemView::doubleClicked, this, &CWirelessSettings::switchToSelectedNetwork);
connect(ui.availableAPFilterEdit, &QLineEdit::textChanged, m_AvailableAPProxyModel, &CAvailableAPProxyModel::setFilterWildcard);
connect(m_Device->getWireless()->getHardware(), &CWirelessHW::signalQualityUpdated,
this, &CWirelessSettings::updateSignalInfo);
connect(m_AvailableAPModel, &CAvailableAPModel::cachedScansUpdated, this, &CWirelessSettings::updateBSSIDMenu);
}
示例2: eventFilter
bool LocationManagementEditHelper::eventFilter(QObject *obj, QEvent *ev)
{
QListView *view = qobject_cast<QListView*>(obj);
if(!view)
return false;
if(ev->type() == QEvent::Show) {
last_uuid = 0;
qDebug() << "EventFilter: " << last_uuid;
}
if(ev->type() == QEvent::KeyPress) {
QKeyEvent *keyEv = (QKeyEvent*) ev;
if(keyEv->key() == Qt::Key_Return) {
handleActivation(view->currentIndex());
view->hide();
return true;
}
}
return false;
}