Changeset View
Changeset View
Standalone View
Standalone View
qt/main.cpp
Context not available. | |||||
#include <QPushButton> | #include <QPushButton> | ||||
#include <QString> | #include <QString> | ||||
#include <QWidget> | #include <QWidget> | ||||
#if QT_VERSION >= 0x050000 | |||||
#include <QWindow> | #include <QWindow> | ||||
#endif | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
Context not available. | |||||
static void | static void | ||||
setup_foreground_window(QWidget *widget, WId parentWid) | setup_foreground_window(QWidget *widget, WId parentWid) | ||||
{ | { | ||||
#if QT_VERSION >= 0x050000 | |||||
/* For windows set the desktop window as the transient parent */ | /* For windows set the desktop window as the transient parent */ | ||||
QWindow *parentWindow = nullptr; | QWindow *parentWindow = nullptr; | ||||
if (parentWid) { | if (parentWid) { | ||||
Context not available. | |||||
wndHandle->setTransientParent(parentWindow); | wndHandle->setTransientParent(parentWindow); | ||||
} | } | ||||
} | } | ||||
#endif | |||||
widget->setWindowFlags(Qt::Window | | widget->setWindowFlags(Qt::Window | | ||||
Qt::CustomizeWindowHint | | Qt::CustomizeWindowHint | | ||||
Qt::WindowTitleHint | | Qt::WindowTitleHint | | ||||
Context not available. |