Hi,
I'm making a simple game the point is I want to put one scene on other scene. Both have the same size. First one will be a background with static and movable items, on second one will be an object which is movable. I order to do such thing I want to set second scene (with an object ) as transparent:

Qt Code:
  1. #include "widget.h"
  2. #include "ui_widget.h"
  3. #include "samolot.h"
  4.  
  5. Widget::Widget(QWidget *parent) : QWidget(parent),
  6. ui(new Ui::Widget)
  7. {
  8. ui->setupUi(this);
  9.  
  10. ui->graphicsView->setBackgroundBrush(Qt::NoBrush);
  11. scena_tla = new QGraphicsScene(this);
  12. scena_sam = new QGraphicsScene(this);
  13. scena_sam->setBackgroundBrush(Qt::NoBrush);
  14. scena_sam->setSceneRect(0,0,200,200);
  15. scena_tla->setBackgroundBrush(Qt::green);
  16. scena_tla->setSceneRect(0,0,200,200);
  17. ui->graphicsView->setScene(scena_tla);
  18. ui->graphicsView->setScene(scena_sam);
  19. samolot *sam = new samolot();
  20. scena_sam->addItem(sam);
  21. scena_sam->setFocusItem(sam, Qt::TabFocusReason);
  22.  
  23. }
  24.  
  25. Widget::~Widget()
  26. {
  27. delete ui;
  28. }
To copy to clipboard, switch view to plain text mode 

unfortunately everything I try I faill. The problem is that second scene is alwals white even when I set

Qt Code:
  1. scena_sam->setBackgroundBrush(Qt::NoBrush);
To copy to clipboard, switch view to plain text mode 
or
Qt Code:
  1. scena_sam->setBackgroundBrush(Qt::transparent);
To copy to clipboard, switch view to plain text mode 

Maybe my whole concept is wrong, so I would be grateful for other ideas how to achieve this funcionality.
Thanks for any ideas