Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QtCamera example app....how do you get that kind of QMainWindow?
Forum Updated to NodeBB v4.3 + New Features

QtCamera example app....how do you get that kind of QMainWindow?

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 1.3k Views 1 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
    ProfRivkin
    wrote on last edited by
    #1

    We notice that the Camera example has a very different QMainWindow based main window in the QtCreator. It contains layout control information and automatically re-laysout the widgets put into it. This is very useful for cross platform.
    However, if you create a new app using QMainWindow, you dont get the same behavior, nor any of the layout options (properties I guess they are). How does one change to this kind of QMainWindow?

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

      Hi,

      The example uses a designer built ui, have a look at the camera.ui file so you can see how it was done.

      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
      • P Offline
        P Offline
        ProfRivkin
        wrote on last edited by
        #3

        I said I did that. Now I want to know how you use the QtCreator (design) system to create that kind of QMainWindow. it does not appear that they are really the same class and it does not appear possible to actually make a new main window like that anymore.

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

          It's not really the QMainWindow that contains all the layouts and related stuff. It is the central widget of the QMainWindow which is generally a QWidget (and it is in the case of the camera ui).

          So basically you set a QWidget as the central widget and do everything in this one like you would if you did the designer stuff for a normal QWidget.

          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