View Full Version : how to remove maximize minimize close
tsuibin
2nd April 2009, 18:15
i need to create window.
I need to remove (maximize, minimize, close) button
how to remove that ?
talk2amulya
2nd April 2009, 18:29
use Qt::FramelessWindowHint like
widget->setWindowFlags(Qt::FramelessWindowHint);
spirit
2nd April 2009, 18:31
take a look at this example QTDIR/examples/widgets/windowflags.
spirit
2nd April 2009, 18:33
use Qt::FramelessWindowHint like
widget->setWindowFlags(Qt::FramelessWindowHint);
or use these flags
Qt::WindowTitleHint | Qt::CustomizeWindowHint
in this case you don't lose possibility of widget resizing.
;)
tsuibin
2nd April 2009, 18:59
or use these flags
in this case you don't lose possibility of widget resizing.
;)
my code like this ...
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindowClass)
{
ui->setupUi(this);
how to set ?
spirit
2nd April 2009, 19:02
try this in ctor
...
setWindowFlags(windowFlags() | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
...
tsuibin
2nd April 2009, 19:16
try this in ctor
...
setWindowFlags(windowFlags() | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
...
this code can't remove them....
spirit
2nd April 2009, 19:20
yup, my mistake, try this
setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
tsuibin
2nd April 2009, 19:28
yup, my mistake, try this
setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
it's ok now ! thanks a lot!:o
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.