c++qtwindowmainwindowqmainwindow

Qt non-main windows


If I want to create a window that is not a main application window (like say I want a Preferences window to pop up when a preferences menu has been clicked in the main window), how would I accomplish this?


Solution

  • "A widget that is not embedded in a parent widget is called a window." https://doc.qt.io/qt-6/qtwidgets-index.html#widgets

    I recommemd to read about window-related functions and properties of QWidget. For preference window windowModality, windowType, windowFlags may be useful.