I have created an application using Qt 5.3.2. When the application loads the Close and Minimize buttons appear in case of Mac and Windows, But when i run the same code on Linux these buttons are no longer available.
Can anyone point me to why this maybe happening? This is the code i use to create the main screen.
Here View is object of QQuickView
:
View view(QUrl("qrc:/qml/main.qml"));
view.setMaximumSize(QSize(1280,700));
view.setMinimumSize(QSize(1280,700));
// Centering the App to the middle of the screen
int width = view.frameGeometry().width();
int height = view.frameGeometry().height();
QDesktopWidget wid;
int screenWidth = wid.screen()->width();
int screenHeight = wid.screen()->height();
view.setGeometry((screenWidth/2)-(width/2),(screenHeight/2)-(height/2),width,height);
view.show();
You can set the windows flag for QQuickView
as :
view.setFlags(Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);