comparison widgets/InfoWidget.cpp @ 154:1b8f08375391

add the RelatedMediaWidget in the InfoWidget
author lbajardsilogic
date Thu, 15 Nov 2007 10:46:57 +0000
parents f3dce7a985cf
children 708c00883180
comparison
equal deleted inserted replaced
153:98df77b4f041 154:1b8f08375391
17 #include <QLayoutItem> 17 #include <QLayoutItem>
18 18
19 #include <iostream> 19 #include <iostream>
20 20
21 #include "sv/main/MainWindow.h" 21 #include "sv/main/MainWindow.h"
22 #include "RelatedMediaWidget.h"
22 23
23 InfoWidget::InfoWidget() : QWidget() 24 InfoWidget::InfoWidget(RelatedMediaWidget * relMediaWidget) : QWidget()
24 { 25 {
25 m_infoLayout = new QGridLayout; 26 m_infoLayout = new QGridLayout;
26 27
27 QWidget *infoWidget = new QWidget; 28 QWidget *infoWidget = new QWidget;
28 infoWidget->setLayout(m_infoLayout); 29 infoWidget->setLayout(m_infoLayout);
30 QScrollArea * scrollArea = new QScrollArea; 31 QScrollArea * scrollArea = new QScrollArea;
31 scrollArea->setWidget(infoWidget); 32 scrollArea->setWidget(infoWidget);
32 scrollArea->setWidgetResizable(true); 33 scrollArea->setWidgetResizable(true);
33 34
34 QVBoxLayout *mainLayout = new QVBoxLayout; 35 QVBoxLayout *mainLayout = new QVBoxLayout;
35 mainLayout->addWidget(scrollArea); 36 mainLayout->addWidget(scrollArea, Qt::AlignTop);
37 mainLayout->addWidget(relMediaWidget, Qt::AlignTop);
36 38
37 setLayout(mainLayout); 39 setLayout(mainLayout);
38 } 40 }
39 41
40 InfoWidget::~InfoWidget() 42 InfoWidget::~InfoWidget()