
Originally Posted by
jacek
So the window isn't visible yet, right?
Well its in an init() function (not the constructor) so I'd assume its technically already visible.

Originally Posted by
jacek
What do you do with playerAndSliderLayout later?
Nothing, it goes out of scope. Well, I set it as the layout for m_controlBar.
I actually redid the whole thing using Designer. Apparently designer doesn't let you set what the layout alignments are? So I did the following:
m_controlBar
= new QWidget( this );
Ui::ControlBar uicb;
uicb.setupUi( m_controlBar );
#define center( A, O ) uicb.A##boxLayout->setAlignment( uicb.O, Qt::AlignCenter )
center( v, m_progressBar );
center( v, m_playerControlsToolbar );
center( h, m_searchWidget );
center( h, m_analyzerWidget );
center( h, m_volumeWidget );
#undef center
m_controlBar = new QWidget( this );
m_controlBar->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum );
Ui::ControlBar uicb;
uicb.setupUi( m_controlBar );
#define center( A, O ) uicb.A##boxLayout->setAlignment( uicb.O, Qt::AlignCenter )
center( v, m_progressBar );
center( v, m_playerControlsToolbar );
center( h, m_searchWidget );
center( h, m_analyzerWidget );
center( h, m_volumeWidget );
#undef center
To copy to clipboard, switch view to plain text mode
Which compiles and I think does what its supposed to do.
...but everything but the m_playerControlsToolbar is invisible, just like before!
Bookmarks