i use QGraphicsScene and QGraphicsView to scale the child widget. i want to just move the child widget and the main frame will also move it.
this is because the default border like frame is some odd and i want to delete it.
now i can only move the child widget. the scence is fixed.
how to move the scence or view without the border like frame?
my code is :

Qt Code:
  1. QASelectFrame::QASelectFrame(QWidget *parent) :QFrame(parent),ui(new Ui::QASelectFrame)
  2. {
  3. ui->setupUi(this);
  4.  
  5. m_scene = new QGraphicsScene;
  6. m_scene->addWidget(this);
  7. m_view = new QGraphicsView(m_scene);
  8. //m_view->setFrameShape(QFrame::NoFrame);
  9. //m_view->setStyleSheet("border: 0px");
  10.  
  11. //m_view->setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
  12. m_view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
  13. m_view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
  14. //m_view->setContentsMargins(QMargins());
  15.  
  16. // title area
  17. setTitleText(tr("Selector"));
  18. }
To copy to clipboard, switch view to plain text mode 

now something is like this:

ca.PNG