Questions tagged [qlayout]

The QLayout class, part of the Qt framework, is the base class of geometry managers.

This is an abstract base class inherited by the concrete classes QBoxLayout, QGridLayout, QFormLayout, and QStackedLayout.

Documentation can be found here for Qt 4.8 and here for Qt 5.

239 questions
0
votes
1 answer

Proper way to manually set the layout of a window in Qt

I need a QMainWindow layout to change depending on the number of cores. Therefore I set it manually (not using the Design mode). My question is: After this layout was created, how can I refer to the widgets it…
0
votes
1 answer

Unclear behavior maximumSize and sizePolicy

I have simple window with 3 buttons. Property sizePolicy of the window is Fixed, Fixed. geometry is 266, 115. Minimum size is 266, 115. Maximum size is 16777215, 16777215. I think in that way: "If sizePolicy is fixed, then i can't stretch window in…
murzagurskiy
  • 1,273
  • 1
  • 20
  • 44
0
votes
2 answers

Remove QWidgets from QLayout?

I fill my QVBoxLayout dynamically with QWidget objects I create during runtime. I would like to remove them as well during runtime, but how? I could remove the widgets one by one: void QLayout::removeWidget(QWidget * widget) Can I somehow iterate…
Ralf Wickum
  • 2,850
  • 9
  • 55
  • 103
0
votes
2 answers

Qt odd layout arrangement

I got the following arrangement (original here): Five unconvencional unsual sized buttons (w:400, h:300) and they are arranged int the following way: four square mode (two on top and two at buttom), closely tight together, and a fifth button in the…
0
votes
2 answers

Is is possible to edit an individual Widget in the QtDesginer?

I got a external library, which includes a derived class from QGLWidget, very similar to that one here. In that library I have a class: class PictureGLWidget : public QGLWidget { //.. } This extends Qt's native QGLWidget and personalizes it. But it…
Ralf Wickum
  • 2,850
  • 9
  • 55
  • 103
0
votes
1 answer

Re sizing a Qt application without using a layout manager

I am trying to make it so a GUI I built in Qt will re size to any users window. I know this is traditionally done using a layout manager, however none of the layout managers suit my needs. Every manager seems to create disproportional widgets. Is…
pmaurais
  • 734
  • 2
  • 9
  • 30
0
votes
1 answer

Adding QWidget without layout to QStackedWidget inlay gap

I have a QStackedWidget that I add multiple QWidget() objects to. Each QWidget has its own layout. For some reason when it adds the QWidget to the QStacked widget, it doesn't add it to say location "0,0"... it seems to always inlay it by 3 or 4…
user2494298
  • 299
  • 3
  • 7
  • 23
0
votes
1 answer

QT5.4 remove and delete widget in a layout

I have a QStackedLayout which contains few QWidget on it. The widgets layout is QVBoxLayout which have also few QPushButton. What I wanted to do is to remove all the widgets inside the QStackedLayout and then delete the widgets and layouts BUT I…
iSa
  • 1,144
  • 2
  • 9
  • 21
0
votes
1 answer

QVideoWidget doesn't show anything when aligned

I've got a strange problem and need some help. The situation is quiet easy: I have a QMediaPlayer, QVideoWidget and some layout (ex. QVboxLayout; well, it doesn't really matter). The problem is when I add QVideoWidget with alignment specified -…
dazewell
  • 396
  • 2
  • 17
0
votes
1 answer

QGraphicsScene too wide

I've got a problem with my layout and I can't find any solution. Below are two images. The first one is from the Qt Designer, where everything looks great (but there is no QGraphicsScene, so it's expectable). The second one is real app, where the…
Honza
  • 939
  • 2
  • 11
  • 28
0
votes
1 answer

Copy layout from another widget

I have so when a person clicks a button it should duplicate a tab but I have run into the problem that tab->layout() only returns QLayout and I can't convert it QHBoxLayout. void MainWindow::on_dublicateSection_clicked() { QWidget* tab =…
Olof
  • 776
  • 2
  • 14
  • 33
0
votes
1 answer

QLayout aligning widget as wrong

I have QLayout class which accept QLabel and align it as Qt::AlignRight in cell, Initially I think it is working(since the size of layout cell is exactly equal to size of pixmap), I have an event associated with the QLabel, ie when mousepressEvent…
Akhil V Suku
  • 870
  • 2
  • 13
  • 34
0
votes
0 answers

pyqt4 not updating layouts and widgets

I'm designing a checkout window, where the user clicks a buttons to add products and when a button is pressed the layout needs to be updated with current items in the basket, I'm using a window with a splitter & I want the rightside to be updated…
Inthu
  • 1,009
  • 1
  • 8
  • 16
0
votes
1 answer

Pyqt4 changing splitter layouts on button press

I used two splitters to spilt the window into three sections, there are three buttons on the top splitter and I want the the layout in the bottom splitter to change everytime the button is pressed, so for example when add user is pressed the layout…
Inthu
  • 1,009
  • 1
  • 8
  • 16
0
votes
1 answer

Widget not shown in QMainWindow

Good evening, the aim is to have a mainwindow (created without Designer but by coding) with three sections next to each other: a list of data points (vector) statistics about the data points a graphical summary (histogram)of the data I have…
RogerWilco77
  • 319
  • 1
  • 3
  • 13
1 2 3
15
16