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. How to create a moveable QWidget in a QWidget show in QGraphicsView
Forum Updated to NodeBB v4.3 + New Features

How to create a moveable QWidget in a QWidget show in QGraphicsView

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 636 Views 2 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.
  • M Offline
    M Offline
    messi
    wrote on last edited by
    #1

    Hi everyone.

    Creating a movable QWidget (ParentWidget) in a QGraphicsView is easy and straight forward with QGraphicsScene::addWidget() .

    What I'm trying todo is to add a movable ChildWidget to the ParentWidget, which should be movable inside the ParentWidget only. The ParentWidget shouldn't move during the interaction with the ChildWidget.

    When I override the ChildWidget::mouseMoveEvent it seems to work. But when I move the ChildWidget it starts flickering. The same happens when I moving the ParentWidget.

    It seem that the problem occurs, because of the interference of the QGraphicsView::mouseMoveEvent

    Is this the correct way to solve the movable QWidget inside a QWidget inside a QGraphicsView?
    If yes, how can I avoid the interference of the different mouseMoveEvent methods?

    Thanks for the help.

    Best regards

    Juergen

    1 Reply Last reply
    1

    • Login

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