rogerholmes
25th September 2009, 16:05
How do you transfer a scene from form 1 to a scene on form 2 ?
:eek:
vcp
25th September 2009, 18:05
Hi
You can do something like this:
Form1
To call the Form2
QGraphicsScene *sourceScene;
// Put a "scene" inside the *sourceScene
SCENE* tab = new SCENE(0,0, surceScene);
tab->show();
Form2
#include <QGraphisScene>
class QGrahicsScene;
class SCENE : public QWidget, private Ui::FormSCENE
{
Q_OBJECT
public:
SCENE(QWidget* parent = 0, Qt::WFlags fl = 0, QGraphicsScene *targetScene=0 );
~SCENE();
(...)
};
SCENE::SCENE(QWidget* parent, Qt::WFlags fl, QGraphicsScene *targetScene)
: QWidget( parent, fl), Ui::FormThumbs()
{
setupUi(this);
// Use you "targetScene" pointer inside your program
};
Bye
rogerholmes
25th September 2009, 20:37
I try that , Thanks
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.