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. QGridLayout setRowStretch
Qt 6.11 is out! See what's new in the release blog

QGridLayout setRowStretch

Scheduled Pinned Locked Moved Unsolved General and Desktop
qgridlayout
2 Posts 2 Posters 984 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.
  • G Offline
    G Offline
    GrahamLa
    wrote on last edited by
    #1

    Hi
    I am having trouble setting a row stretch
    This snippet shows what I have attempted - it is obviosly part of a larger program, but I woujld be grateful if soemone could suggest any reason why the row stretch is not honoured.

        QGridLayout *pxLayout = new QGridLayout();
        pxLayout->addLayout(pxFilterLayout,   0, 0);
        pxLayout->addLayout(pxTableLayout, 1, 0);
        pxLayout->addWidget(pxDetailsLabel, 2, 0);
        pxLayout->addWidget(m_pxDetailsText, 3, 0);
    
    	pxLayout->setRowStretch(0, 10);
    	pxLayout->setRowStretch(1, 80);
    	pxLayout->setRowStretch(2, 10);
    
    
    1 Reply Last reply
    0
    • YunusY Offline
      YunusY Offline
      Yunus
      wrote on last edited by
      #2

      @GrahamLa hi. your problem is not clear to me. But when I run into a problem about QGridLayout I just check the qt calculator example
      ( https://doc.qt.io/qt-5/qtwidgets-widgets-calculator-example.html). it is very helpful to me. I think its better to share the whole code and please be more clear.

      1 Reply Last reply
      2

      • Login

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