本文整理汇总了C++中QWindow::showMinimized方法的典型用法代码示例。如果您正苦于以下问题:C++ QWindow::showMinimized方法的具体用法?C++ QWindow::showMinimized怎么用?C++ QWindow::showMinimized使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QWindow
的用法示例。
在下文中一共展示了QWindow::showMinimized方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Initialize
bool ErrorReport::Initialize() {
try {
// Create a shared memory object.
m_SharedMemory = boost::interprocess::shared_memory_object(boost::interprocess::open_only, m_SharedMemoryName.toStdString().c_str(), boost::interprocess::read_write);
// Map the whole shared memory in this process
m_MemoryMappedRegion = boost::interprocess::mapped_region(m_SharedMemory, boost::interprocess::read_write);
// Our SharedCrashInfo will be stored in this shared memory.
m_pCrashInfo = static_cast<CrashInfo *>(m_MemoryMappedRegion.get_address());
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
if(m_pCrashInfo->window) {
QWindow * window = QWindow::fromWinId(m_pCrashInfo->window);
if(window) {
window->showMinimized();
window->hide();
window->setMouseGrabEnabled(true);
window->setMouseGrabEnabled(false);
}
}
#endif
} catch(...) {
m_pCrashInfo = NULL;
m_DetailedError = "We encountered an unexpected error while collecting crash information!";
return false;
}
if(!m_pCrashInfo || m_MemoryMappedRegion.get_size() != sizeof(CrashInfo)) {
m_DetailedError = "The size of the memory mapped region does not match the size of the CrashInfo structure.";
return false;
}
m_pCrashInfo->reporterStarted.post();
return true;
}