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 https://github.com/micku7zu/QtOneFM
PS: some peaple have tested the app in arch XFCE an the minimize button works.
-
Hi,
Try adding Qt::WindowMinimizeButtonHint flag where you toggle the system title bar settings.
setWindowFlags(Qt::CustomizeWindowHint|Qt::WindowMinimizeButtonHint) -
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();
}@
-
Try adding the flag here
@
if(!checked){
this->setWindowFlags(Qt::CustomizeWindowHint|Qt::WindowMinimizeButtonHint);
}
@ -
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
-
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