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. Qtabelwidget in a qvboxlayout

Qtabelwidget in a qvboxlayout

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.6k 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
    alberto.adami
    wrote on last edited by
    #1

    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
    0
    • S Offline
      S Offline
      Sam
      wrote on last edited by
      #2

      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
      0
      • A Offline
        A Offline
        alberto.adami
        wrote on last edited by
        #3

        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
        0
        • S Offline
          S Offline
          Sam
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alberto.adami
            wrote on last edited by
            #5

            Here:
            http://pastebin.com/BMtgrvcM

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sam
              wrote on last edited by
              #6

              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
              0

              • Login

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