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 to add toolbar and menubar in QDialog?

How to add toolbar and menubar in QDialog?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 2.2k 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.
  • Mahin AbidM Offline
    Mahin AbidM Offline
    Mahin Abid
    wrote on last edited by Mahin Abid
    #1

    Firstly, I should say that i am completely new with qt so if any one wants to help me my request is to show full code where should i implement that and how to write it properly.
    I want to make a application that needs toolbar and menubar. so can i add toolbar and menubar in Qdialog by writing any code?

    JonBJ 1 Reply Last reply
    0
    • Mahin AbidM Mahin Abid

      Firstly, I should say that i am completely new with qt so if any one wants to help me my request is to show full code where should i implement that and how to write it properly.
      I want to make a application that needs toolbar and menubar. so can i add toolbar and menubar in Qdialog by writing any code?

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

      @Mahin-Abid
      There is no evidence that you really want these on a QDialog, when from your other post you have them on your QMainWindow. Try not to run before you can walk! Why would you not want these on your QMainWindow only, why would you want them on a QDialog?

      1 Reply Last reply
      2
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3

        Just add what @JonB said, MenuBar & toolBar comes with QMainWindow class. They don't come with Dialog class. Better use the QMainWindow.

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        JonBJ 1 Reply Last reply
        0
        • dheerendraD dheerendra

          Just add what @JonB said, MenuBar & toolBar comes with QMainWindow class. They don't come with Dialog class. Better use the QMainWindow.

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

          @dheerendra
          The OP is asking about this in his other thread, https://forum.qt.io/topic/110163/i-can-t-change-pages-from-a-qwidget-to-a-qmainwindow
          I think he is aware now that is a better place to have this discussion.

          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