[Qt-interest] Setting MainLayout in QDialog

Aaron Lewis aaron.lewis1989 at gmail.com
Fri Apr 30 14:49:13 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
	How can i set an QHBoxLayout as the central item of an QDialog ?

	Often in QMainWindow , i'd morph an QHBoxLayout into a QWidget , and
use setCentralWidget function. However it doesn't work this time.

	Sample Code:
		
		I've got a UI file ,  has an memeber called mainLayout which is a
QHBoxLayout.


MasterWindow::MasterWindow(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::MasterWindow)
{
    ui->setupUi(this);
    theme *th = new theme();
    ui->mainLayout->addWidget(th);
}


How can i make ui->mainLayout centrally ?

Appreciate any of your help ;-)

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/

iEYEARECAAYFAkva0ckACgkQvf41sEptMqCVzgCguzLF+1Y7Oa/l4gyWNPsn8wqg
eCQAn1bSgtpVyCE6tzeRuSXXqdpYW0c5
=k29Z
-----END PGP SIGNATURE-----



More information about the Qt-interest-old mailing list