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. Adding a QX11EmbedContainer widget to a MainWindow

Adding a QX11EmbedContainer widget to a MainWindow

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.2k 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.
  • N Offline
    N Offline
    noarrt
    wrote on last edited by
    #1

    I am trying to display a QX11EmbedContainer in a MainWindow in my project, however, it only displays when I use setCentralWidget.... when I create a Layout add it it doesn't show.

    Any help would be very welcome. Thanks!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      It's normal, QMainWindow are not designed to have their layout changed (you should even get a warning on the console about that)

      If you want to have several widget with each other on the QMainWindow, you can create a container widget where you set the layout and all the widgets you want, then set that container widget as central widget on your QMainWindow.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • N Offline
        N Offline
        noarrt
        wrote on last edited by
        #3

        Thanks,
        That is what I am trying to do, I am also trying with just a widget with a layout instead of using the QMainWindow class, both cases don't work for displaying the QX11EmbedContainer

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Did you try with QX11EmbedWidget ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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