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. QMainWindow maximize
QtWS25 Last Chance

QMainWindow maximize

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 2.4k 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.
  • A Offline
    A Offline
    alKaabi
    wrote on last edited by
    #1

    how to handle the window maximization ?
    for example when user click maximize I want some object to be in bigger size like TextEdit, while the other object don't change

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

      I'm assuming that you are using the layout to display the elements. Which are the other widgets you have in display ? Did you look at the stretch factor for widget while adding them to layout ? This should help you.

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

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alKaabi
        wrote on last edited by
        #3

        I mean handling the main window maximize button

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

          ok. Did you look at QEvent::WindowStateChange event ?

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

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alKaabi
            wrote on last edited by
            #5

            I search for the QEvent, but i did not found any thing about maximization
            I just found the QSize: sizeIncrement, but I'm not sure how to write the correct code

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

              Did you get a chance to look at QEvent::WindowStateChange and Qt::WindowMaximized and implement event(...) method in your MainWindow class ?

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

              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