本文整理汇总了C++中QScrollArea::windowFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ QScrollArea::windowFlags方法的具体用法?C++ QScrollArea::windowFlags怎么用?C++ QScrollArea::windowFlags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QScrollArea
的用法示例。
在下文中一共展示了QScrollArea::windowFlags方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: activated
void FileBrowser::activated(const QModelIndex &index)
{
QFileInfo fileInfo = fileSystemModel->fileInfo(index);
if (fileInfo.isDir() && fileInfo.fileName() != QLatin1String(".")) {
if (fileInfo.fileName() == QLatin1String("..")) {
QModelIndex parent = view->rootIndex().parent();
fileInfo = fileSystemModel->fileInfo(parent);
if (fileInfo.absoluteFilePath() == rootPath)
fileSystemModel->setFilter(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::AllDirs);
view->setRootIndex(parent);
} else {
fileSystemModel->setFilter(QDir::AllEntries | QDir::AllDirs);
view->setRootIndex(index);
}
setWindowTitle(fileInfo.fileName());
} else {
if (fileInfo.fileName() == QLatin1String("."))
fileInfo = fileSystemModel->fileInfo(view->rootIndex());
#if defined(Q_WS_MAEMO_5)
DocumentPropertiesWidget *widget = new DocumentPropertiesWidget(fileInfo, gallery, this);
widget->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred);
QScrollArea *window = new QScrollArea(this);
window->setWindowFlags(window->windowFlags() | Qt::Window);
window->setAttribute(Qt::WA_DeleteOnClose);
window->setAttribute(Qt::WA_Maemo5StackedWindow);
window->setWidgetResizable(true);
window->setWidget(widget);
window->show();
#elif defined (Q_OS_SYMBIAN)
QScrollArea *window = new QScrollArea(this);
DocumentPropertiesWidget *widget = new DocumentPropertiesWidget(fileInfo, gallery, window);
widget->setWindowModality(Qt::WindowModal);
window->setWindowFlags(window->windowFlags() | Qt::Dialog);
window->setAttribute(Qt::WA_DeleteOnClose);
window->setWidgetResizable(true);
window->setWidget(widget);
window->showMaximized();
#else
DocumentPropertiesWidget *widget = new DocumentPropertiesWidget(fileInfo, gallery, this);
widget->setWindowFlags(widget->windowFlags() | Qt::Dialog);
widget->setAttribute(Qt::WA_DeleteOnClose);
widget->setWindowModality(Qt::WindowModal);
# if defined(Q_OS_SYMBIAN)
widget->showMaximized();
# else
widget->show();
# endif
#endif
}
}