Commit fc3cc25f authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

MediaListView: Parenting widgets correctly.

parent 935ffd9b
......@@ -27,13 +27,14 @@
#include "ListViewController.h"
#include "MediaCellView.h"
#include "Library.h"
#include "StackViewController.h"
ListViewController::ListViewController( StackViewController* nav ) : m_nav( nav )
{
m_title = tr( "Media List" );
m_scrollArea = new QScrollArea();
m_layout = new QVBoxLayout();
m_container = new QWidget();
m_container = new QWidget( nav );
m_layout->setAlignment( Qt::AlignTop );
m_layout->setSpacing( 0 );
......
......@@ -37,7 +37,6 @@ class ListViewController : public ViewController
Q_OBJECT
public:
ListViewController() {}
ListViewController( StackViewController* nav );
~ListViewController();
......@@ -48,11 +47,11 @@ public:
protected:
QVBoxLayout* m_layout;
QWidget* m_container;
private:
QString m_title;
QScrollArea* m_scrollArea;
QWidget* m_container;
StackViewController* m_nav;
};
......
......@@ -52,7 +52,7 @@ MediaListView::~MediaListView()
void MediaListView::newClipLoaded( Clip *clip )
{
MediaCellView* cell = new MediaCellView( clip );
MediaCellView* cell = new MediaCellView( clip, m_container );
connect( cell, SIGNAL ( cellSelected( QUuid ) ),
this, SLOT ( cellSelection( QUuid ) ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment