Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. on event function implementation black screen
Qt 6.12 LTS is out! See what's new in the release blog

on event function implementation black screen

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 780 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.
  • R Offline
    R Offline
    resist
    wrote on last edited by
    #1

    Hello,

    im trying to figure out how to combine qtwidgets and qml in one program. For that i have a simple program consisting of two qwidgets. One of these widgets is getting promoted to a custom class thats inheriting from QQuickWidget.

    In my mainwindow i set the source with ui->widget->setSource(QUrl(source)) which works fine. The problem i'm having is when i try to implement the event function inside the class that inherits QQuickWidget. After defining the method and recompiling i'm getting a black screen instead of the loaded qml.

    I need the event method since i want to do drag and drop from the other qwidget and i havent managed to catch the d&d event any other way yet. This post had a similar issue which is why i implemented it that way.

    Can anyone tell me how to fix the black screen or point me in a different direction how to solve the drag and drop problem? I already tried using DropArea inside my qml

    Thanks in advance

    R 1 Reply Last reply
    0
    • R resist

      Hello,

      im trying to figure out how to combine qtwidgets and qml in one program. For that i have a simple program consisting of two qwidgets. One of these widgets is getting promoted to a custom class thats inheriting from QQuickWidget.

      In my mainwindow i set the source with ui->widget->setSource(QUrl(source)) which works fine. The problem i'm having is when i try to implement the event function inside the class that inherits QQuickWidget. After defining the method and recompiling i'm getting a black screen instead of the loaded qml.

      I need the event method since i want to do drag and drop from the other qwidget and i havent managed to catch the d&d event any other way yet. This post had a similar issue which is why i implemented it that way.

      Can anyone tell me how to fix the black screen or point me in a different direction how to solve the drag and drop problem? I already tried using DropArea inside my qml

      Thanks in advance

      R Offline
      R Offline
      resist
      wrote on last edited by
      #2

      Update:

      Still dont know why the black screen happens if i implement any event function but i got the drop signal to work with droparea. I misunderstood the documentation and had signal entered() in my droparea defined. If i remove it i can access the qml

      1 Reply Last reply
      0
      • R resist has marked this topic as solved on

      • Login

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