#!/usr/bin/perl -w

use Qt 2.0 qw($app %Align %Color %Frame);

$f = QGroupBox->new;
$f->setFrameStyle($Frame{Panel} | $Frame{Sunken});

$gm = QGridLayout->new($f, 3, 3, 5);

$qb = QPushButton->new('Quit', $f);
$app->connect($qb, 'clicked()', 'quit()');
$qb->setFixedSize($qb->size());
$gm->addWidget($qb, 0, 2, $Align{Top} | $Align{Right});

$ed = QMultiLineEdit->new($f);
$ed->setText("This is supposed to be a large window\n you know.");
$ed->setMinimumSize(150, 150);
$gm->addMultiCellWidget($ed, 1, 1, 1, 2);

$l1 = QLabel->new($f);
$l1->setText('This is label 1.');
$l1->setBackgroundColor($Color{Yellow});
$l1->setMinimumSize($l1->sizeHint());
$gm->addWidget($l1, 0, 1);

$l2 = QLabel->new($f);
$l2->setText("This\nis\nlabel\ntoo.");
$l2->setBackgroundColor($Color{Red});
$l2->setMinimumSize($l2->sizeHint());
$gm->addWidget($l2, 1, 0);

$l3 = QLabel->new($f);
$l3->setText('This is label III.');
$l3->setBackgroundColor($Color{Red});
$l3->setMinimumSize($l3->sizeHint());
$gm->addWidget($l3, 2, 2);

$l4 = QLabel->new($f);
$l4->setText('More label.');
$l4->setBackgroundColor($Color{Cyan});
$l4->setMinimumSize($l4->sizeHint());
$gm->addMultiCellWidget($l4, 2, 2, 0, 1);

$gm->activate();
$f->show();

$app->setMainWidget($f);
$app->exec();
