Questions tagged [qformlayout]

18 questions
3
votes
2 answers

Get text from a QLineEdit in a QFormLayout using itemAt

I'm currently working on a program where, in a QFormLayout, I have two columns of QLineEdits. The first column I have stored in a list (meaning they are easily accessible), while the second column isn't stored in a variable or list. I'm trying to…
3
votes
1 answer

QFormLayout expands column of QGridLayout

I am creating a QFormLayout with some items like this: QFormLayout *tableLayout = new QFormLayout(); QLineEdit *line1 = new QLineEdit(); QLineEdit *line2 = new QLineEdit(); tableLayout->addRow(tr("LineText1 "),…
NelDav
  • 785
  • 2
  • 11
  • 30
2
votes
1 answer

Why PyQt5 widgets sometimes have the same id?

(sample problematic code and its output at the bottom) Using PyQt5, I'm writing a QDialog with QTabWidget in it. This tab widget has a QFormLayout layout. I want to iterate over the form and store its right-side widgets (the "fields") as keys in a…
Daniel Diniz
  • 175
  • 8
2
votes
1 answer

How can I put a QFormLayout in a scrollArea?

My program has a main window which creates a widget called wdg. This widget has a QFormLayout with 193 rows. I want to be able to scroll down the QFormLayout. I have tried making a QScrollArea and integrate it with the layout and widget but it…
Abhi Garg
  • 73
  • 7
1
vote
0 answers

Qt: QFormLayout::addRow(QWidget* label, QWidget* field) not adding a new row

I am trying to add a new row to my QFormLayout after I have loaded two QLineEdits from a file, which works, but when I run my code it doesnt add anything, ot atleast anything that I can see. And I am also not able to add any wigets using…
Bugsia
  • 25
  • 6
1
vote
1 answer

PySide2: How to re-implement QFormLayout.takeRow()?

I've noticed that QFormLayout in Pyside2 does not have the takeRow method like its PyQt5 counterpart. I've attempted to subclass QFormLayout to incorporate a similar method, but I've run into Runtime Errors, as the removal behavor of the LabelRole…
1
vote
1 answer

How to print text beside Editor using PyQt5

I just started to learn how to build a GUI using PyQt5. I trace some example on the internet and trying to create a GUI for practice. But I have a problem when I tried to show a text next to the Editor. I follow the way that I found on the internet…
Henry Lu
  • 45
  • 6
1
vote
1 answer

How to replace a widget in an existing QFormLayout?

My QFormLayout formLayout contains 3 QLineEdit widgets (leEntry1, leEntry2 and leEntry3). I want to replace leEntry2 with QComboBox cbOptions, if the value of leEntry1 is "combo." I managed to add a combo box after leEntry3, but when I tried to use…
Nemo XXX
  • 644
  • 2
  • 14
  • 35
1
vote
1 answer

How to initialize layouts in a packed way, reducing space between layouts?

I have several QHBoxLayout's that are all contained in a QVBoxLayout. QHBoxLayout *hb1 = new QHBoxLayout; // ... QHBoxLayout *hb2 = new QHBoxLayout; // ... QWidget *hb1_layout = new QWidget; hb1_layout->setLayout(hb1); QWidget *hb2_layout = new…
Ender
  • 1,652
  • 2
  • 25
  • 50
0
votes
0 answers

How to prevent button from expanding in QFormLayout

I have created a subclass of QDialog in PyQt5 and then set a QFormLayout as its layout. Each row of the layout is defined similar to the following (simplified): layout.addRow(QLineEdit(), QPushButton('Push Me')) I have set the dialog to fixed…
0
votes
1 answer

Application crashing when searching for QLineEdit in QFormLayout

I've experienced a weird crash when trying to find a QLineEdit in a QFormLayout. Firstly, I created a QFormLayout and set a name for it: QFormLayout *charColLayout = new QFormLayout; charColLayout->setObjectName("charColLayout"); Then, I created a…
user15202364
0
votes
1 answer

How to wrap rows of second entry of QFormLayout?Actual and Expected result images are attached

I am using QFormLayout but second item of row is not getting vertically wrapped. .ui file content is true
0
votes
0 answers

In PyQt4 does QWidget with QFormLayout not work if called from QMainWindow?

Tried to search for this, but couldn't find an example where anyone is calling up a QWidget with QFormLayout from QMainWindow. I am trying to make an object I can call from my main application to take input from the user, and I want to use…
0
votes
0 answers

QtFormLayout doens't align when delete a row

I'm new to PyQt5 and I have a basic question that I couldn't solve. I use pyqt designer to organize the layout and widgets. Im trying to make a form like this (a space between the Label and the LineEdit): But evey time I remove the first line it…
Rafael Furquim
  • 121
  • 1
  • 5
0
votes
1 answer

PyQt5 - Passing user input from QLineEdit to update a dictionary in another file

In form.py I have a Form class, which allows the user input various data. The idea is to use this data to update the values in a dictionary in document.py, which is then used to populate a pdf file. The "write custom pdf" method which creates said…
1
2