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. Why use QMainwindow?

Why use QMainwindow?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 975 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.
  • Flaming MoeF Offline
    Flaming MoeF Offline
    Flaming Moe
    wrote on last edited by
    #1

    Hello Dears,

    i have a very general question since i´m still kind of a NewBe
    (Be* NewBe = new Be(ROFL);

    What´s the reason to use QMainwindow?
    What´s the difference compared to when i use a normal Widget, and place Dropdown and Menubuttons and arrange them by "setGeometry();"?

    A lovely day for a ̶g̶̶u̶̶i̶̶n̶̶n̶̶e̶̶s̶ DUFF^^

    K 1 Reply Last reply
    0
    • Malek_KhlifM Offline
      Malek_KhlifM Offline
      Malek_Khlif
      wrote on last edited by
      #2

      QMainWindow offer Menu bar , tools bar, status bar and can contain a center widget .

      I Love Qt <3

      1 Reply Last reply
      0
      • Flaming MoeF Flaming Moe

        Hello Dears,

        i have a very general question since i´m still kind of a NewBe
        (Be* NewBe = new Be(ROFL);

        What´s the reason to use QMainwindow?
        What´s the difference compared to when i use a normal Widget, and place Dropdown and Menubuttons and arrange them by "setGeometry();"?

        K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        I'd say that QMainWindow provides you with a lot of the normal look and fell as one expects from applications. Since the list of methods not negligable compared to normal widget, it has quite some additional functionality.
        If you do not need all those functionality and look and feel, you may inherit QWidget for your class. The question is how much you have to reimplement which is already there. However, it depends heavily on your targets.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          QMainWIndowoffers standard methods to manage MenuBar, ToolBars, StatusBar and Docks.

          IMO the most important feature is to manage them "natively" on different platform (i.e. on OSX the menu bar is on top of the screen and not in the Application Window

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          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