Questions tagged [qgridlayout]

A QGridLayout is a class from the Qt toolkit which lays out GUI widgets in a grid.

QGridLayout takes the space made available to it by its parent layout or widget, divides it up into rows and columns, and puts each widget it manages into the correct cell.

Each column and row has a minimum width/height and a stretch factor (which determines how much of the available space the column or row will get over and above its necessary minimum). It is also possible for widgets to span multiple rows and/or columns.

The official Qt documentation can be found here.

203 questions
-1
votes
1 answer

PYQT5: How to set splitter to a grid layout?

I want to add a grid of plots to a splitter. I know how to set vertical (QSplitter(Qt.Vertical)) and horizontal (QSplitter(Qt.Horizontal)) layouts to a splitter but not sure how to make it in grid layout.
jabbarlee
  • 110
  • 2
  • 11
-1
votes
1 answer

How do you get text from dynamically created QLineEdit in a QToolBox?

I am trying to make a variable number of pages on a QToolbox with a set number of QLineEdit fields. The number of pages and their names is determined by a vector of strings. Each page of the QToolbox has two QLineEdits. After the fillToolbox…
BDD
  • 25
  • 1
  • 6
-1
votes
1 answer

QFileDialog Crashes application on deleting multiple folders

Below is the code, Header File QtGuiApplication1.h #pragma once #include #include "ui_QtGuiApplication1.h" class QtGuiApplication1 : public QMainWindow { Q_OBJECT public: QtGuiApplication1(QWidget *parent =…
sk110
  • 77
  • 2
  • 9
-1
votes
1 answer

QT Gridlayout Item not highlight after clicking?

I have a grid layout as(vtkOpenGLWidget) and inside I distribute the layout in four section. So, I want to highlight the view port when i will clicking on the it. This is my grid layout image view : I will use this code for highlighting the view…
Amar Kumar
  • 45
  • 10
-1
votes
3 answers

How to move a QPushButton inside gridLayout?

I have just tried a simple thing, in designer I created one push button, inside grid layout. The problem is geometry option got disabled in Property box, and I am not able to change the cordinates. In this situation how should I move the push button…
Nikhil Singh
  • 81
  • 10
-2
votes
1 answer

Updating QGridLayout correctly when deleting some items and adding new

I have a QGridLayout that I populate with some QLabels and QLineEdits at startup. The first row of my QGridlayout is the title of the columns. I use this function. def add_row(self, idx, name, units, is_read_only=False): row = idx + 1 # Add…
PBareil
  • 157
  • 6
-2
votes
2 answers

Qt Creator Align button float to the top

I have this gridlayout added onto my centralWidget of my UI in Qt Creator. And I wanted to add several buttons onto the gridlayout. My code is as follows: MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new…
joy lamb
  • 59
  • 2
  • 9
-3
votes
1 answer

Why is my combobox overwriting my label in my grid layout in QT 5.15?

I have a form that was giving me a SegFault Exception so I broke it down and commented out everything but the mainwindow itself. Then I uncommented out the first 2 controls to display. I'm using a qgridlayout but it's not showing things correctly.…
Seth D. Fulmer
  • 490
  • 1
  • 4
  • 21
1 2 3
13
14