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. QTableView resized automatically in a QVBoxLayout
Forum Updated to NodeBB v4.3 + New Features

QTableView resized automatically in a QVBoxLayout

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

    Hello,

    i have a little problem : i add a QTableView in a QVBoxLayout which is in a QScrollArea. But the QTableView is resized automatically. Indeed the table displays only 1 row together while i want the table displayed completly.

    Thanks,

    Octani

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jake007
      wrote on last edited by
      #2

      Hi!

      If I understand correctly, you want to display table view full of cells as in for example in M$ Excel?
      You can user function "QTableWidget::setRowCount(int rows)":http://qt-project.org/doc/qt-5.0/qtablewidget.html#rowCount-prop and "QTableWidget::setColumnCount(int columns)":http://qt-project.org/doc/qt-5.0/qtablewidget.html#columnCount-prop .

      Regards,
      Jake


      Code is poetry

      1 Reply Last reply
      0
      • O Offline
        O Offline
        Octani
        wrote on last edited by
        #3

        Ok thanks you Jake, but i managed to resolve my problem. In fact, i don't put the table in the good layout because in my program there are several levels of layout. Now it's right !

        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