Questions tagged [qvboxlayout]

In the QT framework, the QVBoxLayout class is used to construct vertical box layout objects.

In the QT framework, the QVBoxLayout class is used to construct vertical box layout objects.

http://qt-project.org/doc/qt-5/QVBoxLayout.html

53 questions
9
votes
5 answers

Qt remove empty space between widgets on QVBoxLayout

I have annoying problem. I created QVBoxLayout on which I added my widgets. This is sample from my constructor: layout = new QVBoxLayout; layout->setMargin(0); layout->setContentsMargins(QMargins(0,0,0,0)); layout->setSpacing(0); And then I have…
Tatarinho
  • 754
  • 2
  • 11
  • 31
5
votes
1 answer

Vertical size of a QLabel with wordWrap enabled

I have a QLabel in a QVBoxLayout. Most of the times, it only has one line of text, but sometimes, the text can be too long to fit in one line. So I have to enable wordWrap. I want the label to be as (vertically) small as possible, thus I set…
Tobias Leupold
  • 1,512
  • 1
  • 16
  • 41
3
votes
1 answer

How to adjust space between layouts in a QVBoxLayout

I've seen how to adjust the space between widgets in a layout: Space between widgets in QVBoxLayout. However, I want to know how to adjust space between layouts added to a layout. For example: layout = QVBoxLayout() h1_layout =…
user3731622
  • 4,844
  • 8
  • 45
  • 84
3
votes
1 answer

QLayout with minimum space required

I have a QVBoxLayout in wich I add dynamically on runtime other QWidget s: for(int i = 0; i < value; i++) { QList widgetList_i; //... widgetList_i.append(a lot of widgets) ui->verticalLayout->addWidget(widget_i); } There is a…
Ralf Wickum
  • 2,850
  • 9
  • 55
  • 103
2
votes
1 answer

Adding a QVBoxLayout to a QFrame?

I am trying to figure out how to add a populated QVBoxLayout into a QFrame. In the image you see 4 sliders, each with two labels, and a pushbutton. I've been messing around with QIcon and stylesheets which is why they look a bit odd at the moment.…
Welshhobo
  • 115
  • 11
2
votes
1 answer

QTextEdit expand until fully visible

I have a QDialog(QVBoxLayout) with the following widgets in order: QTextEdit, QLabel, [layout stretch], QPushButton The problem is that I would like the QTextEdit to expand with the QDialog, but only until the scrollbar disappears, after which the…
martin
  • 1,007
  • 2
  • 16
  • 32
2
votes
1 answer

How to set a fixed size in PyQt5 for any widget without breaking layout when resizing

Haven't found this exact problem anywhere, or maybe I just don't recognize it from others. As still pretty much a beginner in programming but not totally oblivious, I am attempting to create an application with PyQt5 but I am having trouble setting…
JackTheCrab
  • 132
  • 2
  • 11
2
votes
2 answers

How to know which tab is selected in Qt?

I have multiple tabs in an application using Qt and I add them all to a QVBoxLayout object. How to know which one is selected?
Engine
  • 5,360
  • 18
  • 84
  • 162
1
vote
1 answer

How to make a layout fill the entire window in PyQt5?

I'm creating an app in PyQt5 and I want a layout that fills the entire window, except the title bar. When I try to set a QVBoxLayout to a QWidget, there remains a gap, as seen below: This is my code: def main(): app = QApplication(sys.argv) …
Itsjul1an
  • 301
  • 1
  • 2
  • 12
1
vote
2 answers

Window not opening inPyQT5 GUI

I am trying to create a GUI application using Pyqt5. The issue I am facing is that the code is running well but record window is not opening. I am attaching the whole code below and the snippet of the function which I am referring to. I have tried…
1
vote
1 answer

PySide2 / QLayout: Cannot add a null layout to QHBoxLayout

I wanted to create with PySide2 a QHBoxLayout having 2 QVBoxLayout as child. For reading ease, I wanted to separate the 2 QVBoxLayout in different functions (left_panel and right_panel). Please find below a sample of the script import sys from…
John
  • 89
  • 1
  • 8
1
vote
1 answer

How to stretch a pixmap to the edge of the window?

I have a PyQt window. The window is made up of a VBoxLayout within a HBoxLayout and is displayed below. This is what the window currently looks like: However, I want the image to stretch to the edge of the window like in the edited image below: I…
HatHat556
  • 91
  • 1
  • 8
1
vote
1 answer

How to make a QTextDocument as a widget?

I need to build a widget, which bases on QTextDocument. MyWidget.h class MyWidget: public QFrame { public: explicit MyWidget( QWidget *p_parent ); private: QTextDocument m_textDocument; }; MyWidget.cpp MyWidget::MyWidget( QWidget *p_parent )…
songvan
  • 369
  • 5
  • 21
1
vote
1 answer

QVBoxLayout row size

I have a widget, I am using QVBoxLayout with the widget to organise rows of widgets. The first widget is a QLabel followed by multiple QPushButton widgets. The width of each widget occupies 100% of the width, however the height of the first widget…
SPlatten
  • 5,334
  • 11
  • 57
  • 128
1
vote
1 answer

Align QSlider with an above QLabel that contains a QPixmap

I am trying to align a QSlider and a QLabel that I have in a QGridBoxLayout For reference, this is for viewing frames in a video, which are shown elsewhere. The QLabel here is for showing labelled sections of the video, with green sections being…
1
2 3 4