Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. can I do the same things of qtwidget in qml app ?
Qt 6.11 is out! See what's new in the release blog

can I do the same things of qtwidget in qml app ?

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

    Hello, everyone

    I have three questions

    1. In root window, can it receive mouse events or keyboard events without creating mousearea inside?

    2. In dialog, I want to create title bar for that. So, then I can drag that dialog around using mouse by clicking on that title bar. How can I do that?

    3. I want to use QML for UI, but want to use QtWidget event handlers (connect, signal, slot mechanism) at the same time. Can I do this?

    Thank you in advance and have a nice weekend

    1 Reply Last reply
    0
    • GrecKoG Offline
      GrecKoG Offline
      GrecKo
      Qt Champions 2018
      wrote on last edited by
      #2
      1. Yes, you can. Either with installEventFilter or by having your own QQuickItem or QQuickWindow subclass where you override the events methods.
      2. You could do that by adding a DragHandler in the header of the dialog.
      3. You can use signal slot mechanism in QML. But your question is weird, why do you want to use QtWidget event handlers in QML?
      M 1 Reply Last reply
      1
      • GrecKoG GrecKo
        1. Yes, you can. Either with installEventFilter or by having your own QQuickItem or QQuickWindow subclass where you override the events methods.
        2. You could do that by adding a DragHandler in the header of the dialog.
        3. You can use signal slot mechanism in QML. But your question is weird, why do you want to use QtWidget event handlers in QML?
        M Offline
        M Offline
        morphism
        wrote on last edited by morphism
        #3

        @GrecKo
        Dear GrecKo:

        Thank you so much for your kindness and your answers.

        You helped me a lot !

        For question no. 3, I am just a beginner to QML, so I want to use signal-slot mechanism under QML's beautiful UI.
        Especially QML offers nice 3D rendering together with 2D graphics.
        So I want to use QML. But I already knew how to use signal-slot mechanism, I just want to use this for those QML's controls.

        Have a nice weekend and see you again, GrecKo
        Take care

        1 Reply Last reply
        0
        • M morphism 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 Extensions
        • Unsolved