Page 1 of 1

Multiple flags QDialog

Posted: 19 Sep 2014, 16:05
by Violette
Bonjour,
je voudrais savoir comment passer plusieurs flags à un QDialog car

Code: Select all

var a = new QDialog(0, (Qt.MSWindowsFixedSizeDialogHint, Qt.WindowTitleHint));
ne garde que le dernier, tout comme

Code: Select all

var a = new QDialog(0, Qt.WindowTitleHint);
a.setWindowFlags(Qt.WindowTitleHint);

Code: Select all

var a = new QDialog();
a.setWindowFlags(Qt.WindowTitleHint);
a.setWindowFlags(Qt.MSWindowsFixedSizeDialogHint);
J'ai testé pleins de syntaxes différentes mais aucune ne marche... :cry: :oops:

Voilà le code en C++...

Code: Select all

window->setWindowFlags (Qt.WindowTitleHint | Qt.MSWindowsFixedSizeDialogHint);
Sniff, merci.

Re: Multiple flags QDialog

Posted: 20 Sep 2014, 10:07
by Jmgr
C'est comme en C++ :

Code: Select all

var a = new QDialog(0, Qt.MSWindowsFixedSizeDialogHint | Qt.WindowTitleHint);

Re: Multiple flags QDialog

Posted: 20 Sep 2014, 13:10
by Violette
Merci mais là ça ne prend en compte aucun des 2 flags, c'est la première chose que j'ai testé, regarde (c'est un gif et il fait 3.3 mo mais bon, c'est plus explicite que des screens) : http://img4.hostingpics.net/pics/854524sniff.gif
Le but étant d'obtenir une fenêtre avec uniquement titre + croix de fermeture, et de taille fixe, qui ne puisse être redimensionnée.