You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to have a parent for my child-widget as the default (qt)-behavior.
It works as expected if I don't use the frameless widget but when I use the FramelessWindow, the child-window is only visible in front of the parent.
Here'a an example of what I mean:
// Undefine this to switch to windows frame mode
#define FRAMELESS_CHILD
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
// style our application with custom dark style
a.setStyle(new DarkStyle);
// create frameless window (and set windowState or title)
FramelessWindow framelessWindow;
framelessWindow.setWindowTitle("Main Window");
framelessWindow.setWindowIcon(a.style()->standardIcon(QStyle::SP_DesktopIcon));
// create our mainwindow instance
MainWindow *mainWindow = new MainWindow;
// add the mainwindow to our custom frameless window
framelessWindow.setContent(mainWindow);
framelessWindow.show();
#ifdef FRAMELESS_CHILD
FramelessWindow childFramelessWindow(&framelessWindow); // Small difference if mainWindow or framelessWindow is parent.
childFramelessWindow.setWindowTitle("Child Window");
framelessWindow.setContent(new QDialog);
childFramelessWindow.show();
#else
// Works as expected but with windows/OS frame
QDialog* child = new QDialog(&framelessWindow);
child->resize(200, 200);
child->show();
#endif // FRAMELESS
return a.exec();
}
The text was updated successfully, but these errors were encountered:
I want to be able to have a parent for my child-widget as the default (qt)-behavior.
It works as expected if I don't use the frameless widget but when I use the FramelessWindow, the child-window is only visible in front of the parent.
Here'a an example of what I mean:
The text was updated successfully, but these errors were encountered: