[Qt-interest] Howto Set Position of a QPushButton on QGraphicsScene ?
Aaron Lewis
aaron.lewis1989 at gmail.com
Sat May 15 07:24:48 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
If i don't take advantage of a layout , how can i change the position
of a QPushButton on a QGraphicsScene ?
Actually i'm trying to implement a Leave Button , which will close this
window.
Code:
QPushButton *leaveBtn = new QPushButton();
leaveBtn->setFocusPolicy(Qt::NoFocus); // No focus by default
leaveBtn->setText("Leave Game !");
gScene->addWidget(leaveBtn); // gScene is QGraphicsScene based
Now i want to change the position of leaveBtn to the left-below corner
, how can i archive it ?
Thanks in advance !
- --
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvuMCAACgkQvf41sEptMqBW5QCePvQTETu4D6sIwsRPqMdCm9SC
9ecAn37nATD1juS87twqH+j9ArOh5VvU
=bY6+
-----END PGP SIGNATURE-----
More information about the Qt-interest-old
mailing list