Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QWidget added to a QGraphicsScene not responding to QGraphicsItemFlags.
Forum Updated to NodeBB v4.3 + New Features

QWidget added to a QGraphicsScene not responding to QGraphicsItemFlags.

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 663 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • musimbateM Offline
    musimbateM Offline
    musimbate
    wrote on last edited by
    #1

    Hi ,
    I am trying to add a QWidget based table to a scene as follows but I find that after being added ,the item does not respond the isMovable flag as a simple circle of rect i draw on the scene does.

    @
    Widget::Widget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Widget)
    {
    ui->setupUi(this);

    mView1=new QGraphicsView(this);

    mTableWidget=new QTableWidget(3,4);

    mScene=new QGraphicsScene(this);

    QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget();

    proxy->setWidget(mTableWidget);

    proxy->setFlag(QGraphicsItem::ItemIsMovable);

    mScene->addItem(proxy);

    mView1->setScene(mScene);

    }

    @

    Is there something I am missing here to make the added item behave like a normal QGraphicsItem in the scene?
    Thanks .

    Why join the navy if you can be a pirate?-Steve Jobs

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved