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. Resize a TreeWidget within a TabWidget if the MainWindow is maximized
Forum Updated to NodeBB v4.3 + New Features

Resize a TreeWidget within a TabWidget if the MainWindow is maximized

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.7k 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.
  • siropS Offline
    siropS Offline
    sirop
    wrote on last edited by
    #1

    I want to setGeometry(..) of my TreeWidget within a TabWidget if the MainWindow is maximized with one click on the toolbar icon.
    But do not find a signal for MainWindow maximized.

    So I'll have to code such a signal?

    P.S. Setting QLayout for my TreeWidget won't work in my case.

    To be, or not to be: that is the question:
    Whether ’tis nobler in the mind to suffer
    The slings and arrows of outrageous fortune,
    Or to take arms against a sea of troubles,
    And by opposing end them?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dbzhang800
      wrote on last edited by
      #2

      Yes, no such signal exists, "But you can use event if you want":http://qt-project.org/doc/qt-4.8/qwindowstatechangeevent.html

      bq. if the MainWindow is maximized with one click on the toolbar icon.

      Do you mean the action is always triggered by the toolbutton? why not resize you treewidget here?

      Note : Due to limitations on some window systems, this does not always report the expected results (e.g., if the user on X11 maximizes the window via the window manager, Qt has no way of distinguishing this from any other resize). This is expected to improve as window manager protocols evolve.

      1 Reply Last reply
      0
      • siropS Offline
        siropS Offline
        sirop
        wrote on last edited by
        #3

        I meant the usual way of maximizing the main Window by clicking on the appropriate icon at the window frame.

        But thanks anyway.
        Will try out your proposal to-morrow.

        To be, or not to be: that is the question:
        Whether ’tis nobler in the mind to suffer
        The slings and arrows of outrageous fortune,
        Or to take arms against a sea of troubles,
        And by opposing end them?

        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