I want have maximizebutton on my Dialog. I tried like this, but not work.
Qt Code:
setWindowFlags(Qt::Dialog | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);To copy to clipboard, switch view to plain text mode
I want have maximizebutton on my Dialog. I tried like this, but not work.
Qt Code:
setWindowFlags(Qt::Dialog | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);To copy to clipboard, switch view to plain text mode
It must be somthing else in your code, this will work.
BTW which dialog are you using?
When you know how to do it then you may do it wrong.
When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
Use QDialog
Qt Code:
ui(new Ui::ManFavorite) { ui->setupUi(this); setWindowFlags(Qt::Dialog | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint); }To copy to clipboard, switch view to plain text mode
Ubuntu 12.04-64bit
Using Qt version 4.8.1 in /usr/lib/x86_64-linux-gnu
try this on your setup
Qt Code:
int main (int argc, char **argv) { QDialog dialog; dialog.setWindowFlags(Qt::Dialog | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint); dialog.show(); return app.exec(); }To copy to clipboard, switch view to plain text mode
When you know how to do it then you may do it wrong.
When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
Still not work
Btw, I don't call it from main function. But from QMainWindow
Well, it is a hint. Maybe your windowing environment decides to ignore it.
Cheers,
_
Bookmarks