plugin, made in this way, will not leave garbage

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1010 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
beardog_uk 2009-02-05 16:35:45 +00:00
parent 2f82a962fc
commit 02378236e8
2 changed files with 35 additions and 4 deletions

View file

@ -1,10 +1,28 @@
//#include <QApplication>
//#include <QString>
//#include <QPushButton>
#include <QVBoxLayout>
#include "SMPlayerPlugin.h"
#include "smplayer.h"
SMPlayerPluginWidget::SMPlayerPluginWidget(QWidget* parent,
Qt::WindowFlags flags )
:QFrame(parent)
{
player = new SMPlayer();
lay = new QVBoxLayout(this);
lay->addWidget( player->gui() );
}
SMPlayerPluginWidget::~SMPlayerPluginWidget()
{
delete player;
}
//==============================================================================
QString
SMPlayerPlugin::pluginDescription() const
{
@ -23,9 +41,8 @@ SMPlayerPlugin::pluginName() const
QWidget*
SMPlayerPlugin::pluginWidget(QWidget * parent )
{
SMPlayer *smplayer = new SMPlayer();
// smplayer->start();
return smplayer->gui();
SMPlayerPluginWidget* wd = new SMPlayerPluginWidget(parent);
return wd ;
}