Important: Please read the Qt Code of Conduct -

Qt C++ windowMinimized no reaction on Ubuntu

  • Heloo all! Me and a friend are creating an app for linux, everyting works but the custom minimize button doesnt whant to work on Ubunutu 14.04, there is no reaction when presed clicked an so on. Any idea?

    This is the code asigned to the button

    void MainWindow::on_buttonMinimize_clicked() { this->setWindowState(Qt::WindowMinimized); }

    here is the app if you what to give it a try

    PS: some peaple have tested the app in arch XFCE an the minimize button works.

  • Moderators


    Try adding Qt::WindowMinimizeButtonHint flag where you toggle the system title bar settings.

  • is there something wrong
    @void MainWindow::on_checkBoxTitleBar_toggled(bool checked)
    settings->setValue("systemTitle", checked);

        this->setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint);


  • Moderators

    Try adding the flag here

  • well if i do this, te minimize button shows on the title bar, and the title bar should be hidden

    what i′m trying to do is to hide the title/menu bar and te close and minimize button, and add my own buttons in to the app

    its something strange becouse in arch works but it does not in ubuntu

  • Lifetime Qt Champion


    I would say that's something specific to Ubuntu and their desktop environment. AFAIK, they customize Qt so there might be something there. You should also ask this on the Ubuntu forums

Log in to reply