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 do I put a QLayout in a QWindow?
Forum Updated to NodeBB v4.3 + New Features

How do I put a QLayout in a QWindow?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt5qt5.11
2 Posts 2 Posters 683 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.
  • timob256T Offline
    timob256T Offline
    timob256
    wrote on last edited by
    #1

    I am trying to put a QLayout in a QWindow.

    But doesn't it come out, is it possible ???
    How to set (buttons, text, 2D chart elements) in a QWindow ??

    I found this text https://doc.qt.io/qt-5/qwindow.html but still did not understand how to insert two-d graphic elements there (buttons, labels, check marks)

    JonBJ 1 Reply Last reply
    0
    • timob256T timob256

      I am trying to put a QLayout in a QWindow.

      But doesn't it come out, is it possible ???
      How to set (buttons, text, 2D chart elements) in a QWindow ??

      I found this text https://doc.qt.io/qt-5/qwindow.html but still did not understand how to insert two-d graphic elements there (buttons, labels, check marks)

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @timob256
      Cross-referenced from your other thread at https://forum.qt.io/topic/132655/how-to-embed-ogre3d-in-qt5-as-a-widget.

      A QWindow is not derived from a QWidget, so, no, you cannot put a QLayout on it. Docs say:

      The QWindow class represents a window in the underlying windowing system.

      So you do not set extra buttons or charts or whatever on a QWindow.

      You may know better than I, and I don't know how it relates to your "Ogre" situation, but you may want to read through What is the difference between a QWindow and QWidget and maybe Introducing QWidget::createWindowContainer() too. Qt: layouts with a Qwidget window container talks about layouts too.

      1 Reply Last reply
      2

      • Login

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