Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt C++ windowMinimized no reaction on Ubuntu
Forum Updated to NodeBB v4.3 + New Features

Qt C++ windowMinimized no reaction on Ubuntu

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    iuliancalin
    wrote on last edited by
    #1

    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 https://github.com/micku7zu/QtOneFM

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

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      Try adding Qt::WindowMinimizeButtonHint flag where you toggle the system title bar settings.
      setWindowFlags(Qt::CustomizeWindowHint|Qt::WindowMinimizeButtonHint)

      157

      1 Reply Last reply
      0
      • I Offline
        I Offline
        iuliancalin
        wrote on last edited by
        #3

        is there something wrong
        @void MainWindow::on_checkBoxTitleBar_toggled(bool checked)
        {
        settings->setValue("systemTitle", checked);
        ui->buttonMinimize->setVisible(!checked);
        ui->buttonClose->setVisible(!checked);

        if(!checked){
            this->setWindowFlags(Qt::CustomizeWindowHint);
        }else{
            this->setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint);
        }
        this->showNormal();
        

        }@

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          Try adding the flag here
          @
          if(!checked){
          this->setWindowFlags(Qt::CustomizeWindowHint|Qt::WindowMinimizeButtonHint);
          }
          @

          157

          1 Reply Last reply
          1
          • I Offline
            I Offline
            iuliancalin
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              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

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved