Qt Hide Taskbar Item
Qt Hide Taskbar Item:
The short parent widget place the holder and without a widget parent is consider by a top level window and to create by child level window and not get a taskbar entry . The parent window on the other hand also not get a taskbar entry because it does not set as clear .
class MyWindowWidget : public QWidget { public: MyWindowWidget(QWidget *parent) : QWidget(parent, Qt::Dialog) { } }; int main(int argc, char *argv[]) { QApplication app(argc, argv); QMainWindow window; MyWindowWidget widget(&window); widget.show(); return app.exec(); }
Here the taskbar is not visible .
The simple and short answer is:
To hide the widget without displaying in the taskbar and will be check by the windowflags of the widget. The Qt::Dialog | Qt::Tool and Qt::CustomizeWindowHint the window has not fixed up. The gate policy of application. Hiding the last toplevel-window and exit by the normal and to call QApplication::setQuitOnLastWindowClosed false
The alternative answer is:
To fixed the Qt::SubWindow flag to the widget.