PDA

View Full Version : getting rid of border



darksaga
17th August 2007, 21:12
hi all,

I'd like to get rid of the border around the QGraphicsView if I setup a QDialog or QWidget as follows:


TestDialog::TestDialog(QWidget *parent)
: QDialog(parent)
{
QGraphicsView *view = new QGraphicsView(this);
QHBoxLayout *centerLayout = new QHBoxLayout;
centerLayout->addWidget(view);
setLayout(centerLayout);
}


this image shows, what I mean:
http://img244.imageshack.us/img244/5630/dialogwf7.png

regards

wysota
17th August 2007, 21:31
view->setFrameShape(QFrame::NoFrame);

jpn
17th August 2007, 21:45
I think he means the layout margin :)

centerLayout->setMargin(0);

darksaga
17th August 2007, 21:53
I think he means the layout margin :)

centerLayout->setMargin(0);

yupp, margin is, what I was looking for ;)

what I tried


centerLayout->setSpacing(0);

but this didn't help ...

thnx again jpn