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 drag and drop into QOpenGLWindow?
Forum Updated to NodeBB v4.3 + New Features

How to drag and drop into QOpenGLWindow?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 278 Views
  • 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.
  • L_RaizL Offline
    L_RaizL Offline
    L_Raiz
    wrote on last edited by
    #1

    In the MainForm of my application, I implemented both dragEnterEvent() and dropEvent(). MainForm contains a splitter and I want to have one of the splitter panels to display contents of QOpenGLWindow. I also want to support some QWidget-like functionality associated with this panel. There are reasons why I don't want to use QOpenGLWidget so I used QWidget::createWindowContainer() to house my window. Now I struggle to make drag and drop work. It works if a drop happens above other areas of the main form but not above QOpenGLWindow. Event handling functions simply never get called. While investigating I implemented eventFilter and installed it for both QWindowContainer and MainForm. I do see that both events do come to QWindowContainer but they never propagate to the main form. (I would expect that to be the default behavior without any work on my part). My attempts to use brutal force and direct these events to MainForm result in ugly hacks that either has to deal with recursion inside of eventFilter (using send/post) or make MainForm drag and drop handlers public.

    Is there a better way to deal with this issue?

    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