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. Canvas QT?
Qt 6.11 is out! See what's new in the release blog

Canvas QT?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 594 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.
  • P Offline
    P Offline
    primator77
    wrote on last edited by
    #1

    Hello, i created vulkan window(https://doc.qt.io/qt-5/qtgui-hellovulkanwindow-example.html). I just want to ask, if in QT is something like wxGLCanvas in wxwidgets... I want to have normal GUI(MainWindow), and then when i press button, i want to "Canvas" appear, and then vulkan drawing will start. Can someone help me out, how could i do that?
    Thank you very much!

    Pl45m4P 1 Reply Last reply
    0
    • P primator77

      Hello, i created vulkan window(https://doc.qt.io/qt-5/qtgui-hellovulkanwindow-example.html). I just want to ask, if in QT is something like wxGLCanvas in wxwidgets... I want to have normal GUI(MainWindow), and then when i press button, i want to "Canvas" appear, and then vulkan drawing will start. Can someone help me out, how could i do that?
      Thank you very much!

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @primator77

      Yes, you can embed a QWindow (in your case your QVulkanWindow) as QWidget in your QMainWindow and show it when you press a button, for example.

      It's done with a Qt3D window here

      • https://doc.qt.io/qt-6/qt3d-basicshapes-cpp-example.html

      Just look at the code and replace the

      Qt3DExtras::Qt3DWindow *view = new Qt3DExtras::Qt3DWindow();
      

      window with your Vulkan window.
      Then create a QWidget container for your QWindow like this:

      QWidget *container = QWidget::createWindowContainer(view);
      

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      P 1 Reply Last reply
      3
      • Pl45m4P Pl45m4

        @primator77

        Yes, you can embed a QWindow (in your case your QVulkanWindow) as QWidget in your QMainWindow and show it when you press a button, for example.

        It's done with a Qt3D window here

        • https://doc.qt.io/qt-6/qt3d-basicshapes-cpp-example.html

        Just look at the code and replace the

        Qt3DExtras::Qt3DWindow *view = new Qt3DExtras::Qt3DWindow();
        

        window with your Vulkan window.
        Then create a QWidget container for your QWindow like this:

        QWidget *container = QWidget::createWindowContainer(view);
        
        P Offline
        P Offline
        primator77
        wrote on last edited by
        #3

        @Pl45m4 Thank you very much, all working! Appriciate your help:)

        1 Reply Last reply
        0
        • P primator77 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