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 Insert different window within tabwidget of mainwindow
Forum Updated to NodeBB v4.3 + New Features

How to Insert different window within tabwidget of mainwindow

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 1.1k 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.
  • S Offline
    S Offline
    Shankar B
    wrote on last edited by
    #1

    Hi have two gui in my application

    1. In my mainwindow, i have tab widget.
    2. 1st tab contains some widget.
    3. i want to display new window(my second gui) inside 2nd tab of mainwindow

    I am unable to figure it out how get second gui insde 2nd tab of mainwindow.

    jsulmJ 1 Reply Last reply
    0
    • S Shankar B

      Hi have two gui in my application

      1. In my mainwindow, i have tab widget.
      2. 1st tab contains some widget.
      3. i want to display new window(my second gui) inside 2nd tab of mainwindow

      I am unable to figure it out how get second gui insde 2nd tab of mainwindow.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Shankar-B said in How to Insert different window within tabwidget of mainwindow:

      i want to display new window(my second gui) inside 2nd tab of mainwindow

      You want to show a window inside another window?
      Are you talking about MDI or do I misunderstand you?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • S Offline
        S Offline
        Shankar B
        wrote on last edited by
        #3

        Hi jsulm,
        I want to show window inside tabwidget of mainwindow

        jsulmJ 1 Reply Last reply
        0
        • S Shankar B

          Hi jsulm,
          I want to show window inside tabwidget of mainwindow

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Shankar-B A window is usually not inside another window - that's why it is called window. Do you maybe mean that you want to show a widget in your tabwidget? You should really use correct terminology and explain exactly what you want to do.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2
          • S Offline
            S Offline
            Shankar B
            wrote on last edited by
            #5

            Sorry for mistake.How to show widget in side tabwidget.

            jsulmJ 1 Reply Last reply
            0
            • S Shankar B

              Sorry for mistake.How to show widget in side tabwidget.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Shankar-B said in How to Insert different window within tabwidget of mainwindow:

              How to show widget in side tabwidget

              Take a look at this example: https://doc.qt.io/qt-5/qtwidgets-dialogs-tabdialog-example.html
              Especially this part:

              TabDialog::TabDialog(const QString &fileName, QWidget *parent)
                  : QDialog(parent)
              {
                  QFileInfo fileInfo(fileName);
              
                  tabWidget = new QTabWidget;
                  tabWidget->addTab(new GeneralTab(fileInfo), tr("General"));
                  tabWidget->addTab(new PermissionsTab(fileInfo), tr("Permissions"));
                  tabWidget->addTab(new ApplicationsTab(fileInfo), tr("Applications"));
              

              Here GeneralTab, PermissionsTab and ApplicationsTab are widgets (derived from QWidget).

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1

              • Login

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