Hi
You can do something like this:
Form1
To call the Form2
// Put a "scene" inside the *sourceScene
SCENE* tab = new SCENE(0,0, surceScene);
tab->show();
QGraphicsScene *sourceScene;
// Put a "scene" inside the *sourceScene
SCENE* tab = new SCENE(0,0, surceScene);
tab->show();
To copy to clipboard, switch view to plain text mode
Form2
#include <QGraphisScene>
class QGrahicsScene;
class SCENE
: public QWidget,
private Ui
::FormSCENE{
Q_OBJECT
public:
~SCENE();
(...)
};
: QWidget( parent, fl
), Ui
::FormThumbs() {
setupUi(this);
// Use you "targetScene" pointer inside your program
};
#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
};
To copy to clipboard, switch view to plain text mode
Bye
Bookmarks