Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Qtabelwidget in a qvboxlayout

    General and Desktop
    2
    6
    1371
    Loading More Posts
    • 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
      alberto.adami last edited by

      Hi, i am doing a project to show chart.
      I have a qvboxlayout with a table that is a my class sublassing from qtablewidget and a canvas for draw chart.
      But in my layout the table expand in all the layout and i can't see the other widget.
      How can i do for see all the widget in my layout??

      1 Reply Last reply Reply Quote 0
      • S
        Sam last edited by

        Did you set the "minimumSize":http://qt-project.org/doc/qt-4.8/qwidget.html#minimumSize-prop for your widget/canvas ? Also check for "sizePolicy()":http://qt-project.org/doc/qt-4.8/qwidget.html#sizePolicy-prop

        1 Reply Last reply Reply Quote 0
        • A
          alberto.adami last edited by

          no, but the problem is the table because if i take in the layout only the canvas i see that, the table take all the space in my centralwidget of my mainwindow..

          1 Reply Last reply Reply Quote 0
          • S
            Sam last edited by

            Can you share your implementation code, so that we can also have a look.

            1 Reply Last reply Reply Quote 0
            • A
              alberto.adami last edited by

              Here:
              http://pastebin.com/BMtgrvcM

              1 Reply Last reply Reply Quote 0
              • S
                Sam last edited by

                I tested your code with a test class, and it works as required. For your implementation try to set the "minimumHeight":http://qt-project.org/doc/qt-4.8/qwidget.html#minimumHeight-prop for both your widgets i.e Table and Canvas.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post