Qt Hide Taskbar Item



  • 3 Answer(s)

    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 .

    Answered on January 8, 2019.
    Add Comment

    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

    Answered on January 8, 2019.
    Add Comment

    The alternative answer is:

            To  fixed the Qt::SubWindow flag  to the widget.

    Answered on January 8, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.