Results 1 to 2 of 2

Thread: QGraphicsView move child associate the border like frame

  1. #1

    Red face QGraphicsView move child associate the border like frame

    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);
    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");
    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());
    16. // title area
    17. setTitleText(tr("Selector"));
    18. }
    To copy to clipboard, switch view to plain text mode 

    now something is like this:


  2. #2

    Default Re: QGraphicsView move child associate the border like frame

    can any one help me , please

Similar Threads

  1. get QGraphicsView's border like frame pointer?
    By satan_ljc in forum Newbie
    Replies: 0
    Last Post: 15th December 2018, 10:45
  2. Add a Widget to border(frame) of QGroupBox
    By mohammadmohsen in forum Qt Programming
    Replies: 1
    Last Post: 14th May 2014, 13:33
  3. How to remove title but with frame border?
    By shaoli.xie in forum Qt Programming
    Replies: 4
    Last Post: 11th April 2012, 15:14
  4. Associate data with child items in listView
    By moiit in forum Qt Programming
    Replies: 3
    Last Post: 11th August 2011, 12:56
  5. Border and Frame
    By big4mil in forum Newbie
    Replies: 3
    Last Post: 12th March 2010, 20:46

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.