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. How to make my widget in a center of the mainwindow?
Forum Updated to NodeBB v4.3 + New Features

How to make my widget in a center of the mainwindow?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 3 Posters 626 Views 2 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.
  • T Offline
    T Offline
    Tamizharasan
    wrote on last edited by
    #1

    BCRun* mdialog = new BCRun;
    MainWindow::setCentralWidget(mdialog);
    I used this but its showing on the corner only.

    jsulmJ 1 Reply Last reply
    0
    • T Tamizharasan

      BCRun* mdialog = new BCRun;
      MainWindow::setCentralWidget(mdialog);
      I used this but its showing on the corner only.

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

      @Tamizharasan http://doc.qt.io/qt-5/layout.html
      Also, why do you set central widget?

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

      T 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Tamizharasan http://doc.qt.io/qt-5/layout.html
        Also, why do you set central widget?

        T Offline
        T Offline
        Tamizharasan
        wrote on last edited by Tamizharasan
        #3

        @jsulm To hide my existing widget and make this widget front . when the push button is clicked.

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

          Hi,

          Wouldn't QStackedWidget be a simpler solution ?

          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
          1

          • Login

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