Questions tagged [qt-designer]

Qt Designer is Qt's tool for designing and building graphical user interfaces (GUIs) from Qt components.

Qt Designer

Qt Designer is Qt's tool for designing and building graphical user interfaces (GUIs) from Qt components. You can compose and customize your widgets or dialogs in a what-you-see-is-what-you-get (WYSIWYG) manner, and test them using different styles and resolutions.

Widgets and forms created with Qt Designer integrated seamlessly with programmed code, using Qt's signals and slots mechanism, that lets you easily assign behavior to graphical elements. All properties set in Qt Designer can be changed dynamically within the code. Furthermore, features like widget promotion and custom plugins allow you to use your own components with Qt Designer.

References

1755 questions
11
votes
1 answer

Tab order in Qt

I have complicated UI created with Qt Designer. It has a hierarchy of nested widgets. I need certain tab order to switch between controls inside these widgets. But as far as I see, Qt designer allows to define tab order only within one widget. How…
Lecko
  • 1,275
  • 1
  • 17
  • 32
11
votes
1 answer

Setting a plain background color for a QGraphicsView widget

I'm trying to display a little square of solid color. I've created a QGraphicsView widget myGraphicsView and call: ui->myGraphicsView->setBackgroundBrush(QBrush(Qt::red, Qt::SolidPattern)); But it stays white. What am I doing wrong?
CakeMaster
  • 1,807
  • 4
  • 16
  • 16
11
votes
6 answers

Generate .h and .cpp from .ui file

Suppose I have the file about.ui. How can I make the "about.h" and the "about.cpp" from my .ui file? I have to create a .moc file too? How can I compile this after the creaton to see if all ocurred correctly?
LucasCaixeta
  • 151
  • 1
  • 3
  • 8
11
votes
1 answer

Setting layout margins in pyqt

In Qt Designer I can set the margin of a VBox or HBox using the properties layout*Margin. How can I do that in pyqt?
waspinator
  • 6,464
  • 11
  • 52
  • 78
10
votes
1 answer

PyQt - Adjusting for Different Screen Resolution

I've developed an application using PyQt on a computer that has a resolution of 3840x2160. I used QtDesigner to create almost all of my UI needs, then added the few other things I needed manually in python. Once I went to deploy the application, I…
aoh
  • 1,090
  • 2
  • 13
  • 25
10
votes
1 answer

Qt size policy and stretch factors

How do the options size policy and stretch factors influence the size of a widget? The image below shows previews of three differently arranged windows. For all three windows (W1-W3) the widget on the right is a QFrame widget with the horizontal…
Woltan
  • 13,723
  • 15
  • 78
  • 104
10
votes
1 answer

PyCharm 4 wont open Qt Designer on double click of .ui file. (Linux)

PyCharm and Qt Designer are both installed and running. PyCharm shows .ui files as Qt designer files, but nothing happens when I click on them, or double click on them. In order to edit them, I have to right click --> show in open folder with…
Frac
  • 321
  • 5
  • 13
10
votes
1 answer

Fixing sizes of widgets in QT designer layouts

I have a QT form that has literally hundreds of widgets and to make them all fit on the screen at once (as required) I need to make them pretty small. The Form will have fixed (non resizable) size when used. I can resize the widgets to the desired…
stefano
  • 769
  • 2
  • 10
  • 24
9
votes
2 answers

How to implement a signal/slot defined in Qt Designer

I am trying to connect the click() signal of a button to my own function. The button is in a widget that I created with QT Designer. I load the .ui file with QUiLoader like so: class MyWidget(QtGui.QMainWindow): def __init__(self, *args): …
Sven
  • 985
  • 1
  • 11
  • 27
9
votes
1 answer

applying python functions directly to Qt designer as signals

I am new to Qt and GUI programming overall but i have done a fair bit of coding in python - writing modules and so on. I need to develop simple GUIs for some of my old modules. What i am trying to do can be represented by the following simple…
linuS
  • 171
  • 1
  • 8
9
votes
3 answers

How to create toggle switch button in qt designer?

I am trying to create toggle button in qt designer. I refer on internet also but i couldn't find how to do that. Can anyone know how to do toggle switch button. I have attached a sample button image. EDIT I created a text box below that i want…
Anonymous
  • 113
  • 1
  • 1
  • 10
9
votes
2 answers

Qt Window incorrect size until user event

I'm creating a screen where users can add certain tiles to use in an editor, but when adding a tile the window does not correctly resize to fit the content. Except that when I drag the window or resize it even just a little then it snaps to the…
Eejin
  • 770
  • 1
  • 8
  • 29
9
votes
4 answers

Qt GUI doesnt change after compilation

I created a GUI using the Qt Designer compiled and run. Then I made a few changes in the GUI and recompiled again but the GUI remained the same. Even if I delete the widgets and recompile they appear... I tried Clean All and Clean Project but no…
kaycee
  • 1,199
  • 4
  • 24
  • 42
9
votes
3 answers

Custom Qt Widgets with python for Qt Designer

I am trying to write a custom widget for the Qt Designer using only Python. I was following a couple of tutorials I found online but none of them were working or anything close to what I would call to be a minimum working example. So my questions…
Woltan
  • 13,723
  • 15
  • 78
  • 104
9
votes
1 answer

Qt standard dialogs example: Open file

I'm beginning to learn Qt for use in one of my projects, and what I need to do is create a GUI that allows the user to open a file. I was looking through the examples and I found one of them that has exactly what I need; the problem is that it's…
JM92
  • 1,063
  • 3
  • 13
  • 22