Skip to main content

All Questions

Tagged with
0 votes
1 answer
2k views

PyQt QHboxLayout with resizing widgets no left align

I have a HboxLayout with a number of widgets. I set the size of the widgets manually, to dynamically fit the height of the window, and to have a certain aspect ratio. Initially, the widgets appear ...
user104100's user avatar
1 vote
1 answer
778 views

How to add rows of widgets after deletion in a QGridLayout

I am adding rows of widgets to a QGridLayout like this (with a button): def ajouter_un_mot_vocab(self) : ''' ''' # Dictionnaire des mots de vocabulaire self.dico_vocab_mot = {} ...
ekdmekdm's user avatar
  • 171
0 votes
1 answer
396 views

How to uncheck all radio buttons from another class

I want to uncheck some radio buttons in class A by pushing a button in class B. My example codes are as below: import sys, os import PyQt4 from PyQt4.QtCore import * from PyQt4.QtGui import * ...
ryan9025's user avatar
  • 269
3 votes
1 answer
2k views

Custom widget on QItemDelegate editor for QTableView

I have a QTableView showing a data from a custom model. I have a QItemDelegate for the edition on each of the cells. One column of the view has a custom widget comprised by a QLineEdit and a QCheckBox....
user20679's user avatar
  • 442
2 votes
1 answer
7k views

Remove Widget and Layout in PyQt

Whenever i clicked on Size Button it only clear TEXT field. i want to clear all layout as well as Widgets! i am new in python programming. Can you help me for solve problem. import sys from PyQt4 ...
Akash D G's user avatar
  • 188
2 votes
1 answer
908 views

How adjust QHBoxLayout and QGraphicsView size dynamically with the mouse ? (Python, Pyqt4)

I'm struggling to find a solution to an issue. I'm trying to modify the space allocated to two graphicscene in a window. To be precise. I have a QHBoxLayout where I place two QGraphicsViews to plot ...
ymmx's user avatar
  • 4,967
0 votes
1 answer
5k views

How can the spacing between widgets in a QGridLayout remain fixed on window resize?

I am building an application in PyQT4. A principle part of this app will be to maintain a grid of widgets (sub classed from QLineEdit widgets). I am organizing the widgets into a QGridLayout. When I ...
Trekkie's user avatar
  • 994
1 vote
1 answer
2k views

PyQt: switch windows/layouts created by Qt Designer

I am creating an app using PyQt4. I have created two interfaces with Qt Designer. When a button is pushed I would like to switch between one layout and the other. A sample of my code is: from PyQt4 ...
Cheyn Shmuel's user avatar
2 votes
0 answers
1k views

PyQt: layout cuts off part of widget edges [closed]

I'm trying to make a layout for my app. I designed it in Qt Designer, and in the preview everything looks right. But when I run the code, the progress bar sides are cut off. I guess I need to play ...
Marius Valentavicius's user avatar
11 votes
2 answers
34k views

PyQt - Reducing margins and spacing in widget *expands* layout

Consider the case of a QMainWindow with a QWidget as central widget. This widget has a QHBoxLayout. I add two other widgets to it, each with a QVBoxLayout. I now want to bring the Widgets inside ...
ImportanceOfBeingErnest's user avatar
0 votes
2 answers
1k views

PyQt4 GUI Box Layout Fixed Width

Is there a way to set a fixed width of a QHBoxLayout? For example, when I have two small widgets in it that take up little space and I don't want the two to split over the entire screen width when I ...
Vedran's user avatar
  • 13
11 votes
2 answers
36k views

How to hide a layout in PyQt?

My code contains a vertical box layout which is a combination of a vertical box layout in left and one at right. I was wondering if there is a way to hide the left layout with all its widgets when a ...
sparrow's user avatar
  • 297
0 votes
0 answers
706 views

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 ...
Inthu's user avatar
  • 1,029
4 votes
2 answers
5k views

Remove everything from a frame in pyqt

There are some examples of removing specific items from a layout, but I can not find anything on simply deleting everything from a frame. Using pyqt designer, I have created a frame. Then using ...
user-2147482637's user avatar
1 vote
1 answer
81 views

Weird spacing in my UI layout

whenever I run this script of mine, the layout of my elements are somewhat in the correct area but the spacing in the right column (where the labels/button/line edit resides) makes it very unsightly ...
dissidia's user avatar
  • 1,581

15 30 50 per page