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
19
votes
8 answers

Qt: Drop-down button?

How can I create a "drop down button" in Qt? For a non-Qt example, see: Combination button/dropdown in office The key point is that the widget needs an icon for the primary action, and a visually separate "pulldown arrow" to show secondary icons /…
nonot1
  • 2,788
  • 4
  • 25
  • 41
19
votes
1 answer

Controls insist on being too large, and won't resize, in QtDesigner

I made a "widget" in Qt Designer with about a dozen controls organized into horiz. and vert. layouts. Oddly, every horizontal layout wants to be some large size, about 400 px wide, when the whole form is set to be 275px wide. Buttons etc contained…
DarenW
  • 16,549
  • 7
  • 63
  • 102
19
votes
2 answers

PyQt: No error msg (traceback) on exit

My PyQt application no longer prints the error (stderr?) to the console. I use QtDesigner and import the UI like this: from PyQt5 import QtCore, QtGui, QtWidgets import sys from PyQt5.uic import loadUiType Ui_MainWindow, QMainWindow =…
Jannis
  • 401
  • 1
  • 4
  • 9
18
votes
1 answer

AttributeError: 'Ui_MainWindow' object has no attribute 'setCentralWidget'

I am still working on the GUI for my Database and now i have a different error: Traceback (most recent call last): File "G:\Python\Database Kast Thuis\PyQt Test\MainMenu_ui.py", line 84, in ex = Ui_MainWindow() File…
That One
  • 581
  • 2
  • 6
  • 17
18
votes
2 answers

Qt Designer - window won't get smaller than a QLabel with pixmap

I'm creating a program (in Qt Creator 2.8.1, Qt 5.1.1) that basically shows an image, in this case a playing card (along with a few buttons, labels, and a line edit). All widgets are in vertical/horizontal layouts, and the window layout is a grid…
Sampaio
  • 337
  • 2
  • 13
17
votes
5 answers

How can I add item data to QComboBox from Qt Designer/.ui file

I'm using Qt Designer (well, Qt Creator actually, but specifically the part derived from Qt Designer), and I've added a few QComboBox items to a dialog with a constant list of items. I need to map the items in the combo box to strings (which are…
LRFLEW
  • 1,251
  • 3
  • 11
  • 19
17
votes
4 answers

Select text of QLineEdit on focus

I have created a dialog using QtDesigner. There is a QLineEdit object in the dialog with some default content. When the dialog initializes and the focus goes to the QLineEdit, I want the default content to be auto selected, so once the user start…
GG.
  • 2,835
  • 5
  • 27
  • 34
17
votes
1 answer

How to remove slot, created in Designer mode?

I've created the button cancelButton. Then I've created function-slot on_cancelButton_clicked() for it using context menu item Go to slot. But, after a while, I've deleted this button (it wasn't longer needed), and tried to delete that function, but…
Ivan Akulov
  • 4,323
  • 5
  • 37
  • 64
16
votes
3 answers

What does "Process finished with exit code 1" mean?

I tried to develop a simple currency program but I have a problem. When I click on Çevir, the program should calculate money (like an exchange). But I can't do it. PyCharm writes Process finished with exit code 1 when I click Çevir from PyQt5 import…
buraks
  • 163
  • 1
  • 1
  • 7
16
votes
1 answer

AttributeError: module 'PyQt5.QtGui' has no attribute 'QWidget'

So, I'm trying to make a UI for a python code I have, but keep stumbling up on problems... Right now, all the code does is make a window, with 2 texteditor boxes, and one button. When the button is pressed, it prints 'Test'. I used QTDesigner to…
CandyGum
  • 461
  • 3
  • 7
  • 19
16
votes
1 answer

Qt Designer how to change background

This is an repost. I am kind of new in QtDesigner and wanted to do something about the uglyness of just some buttons. All i have done yesterday was looking on the internet on how to change the background color of a screen in Qt Designer. How to…
That One
  • 581
  • 2
  • 6
  • 17
16
votes
2 answers

pyQt5 change MainWindow Flags

I use python 3.4 , pyQt5 and Qt designer (Winpython distribution). I like the idea of making guis by designer and importing them in python with setupUi. I'm able to show MainWindows and QDialogs. However, now I would like to set my MainWindow,…
polgia0
  • 347
  • 1
  • 3
  • 14
16
votes
3 answers

PyInstaller + UI Files - FileNotFoundError: [Errno 2] No such file or directory:

I'm trying to export my .py script to .exe using PyInstaller, which has dependencies on .ui files which were created using Qt Designer. I can confirm that my .py script works just fine when running it through PyCharm - I'm able to see the GUI I've…
giran
  • 368
  • 1
  • 2
  • 11
16
votes
1 answer

Style sheets / Qt Designer support for high dpi screens?

Today I have ported my application from Qt5.5 to Qt5.6RC. Running it on my high dpi screen the widgets appeared tiny. After reading this and setting QT_AUTO_SCREEN_SCALE_FACTOR to "1" at least it is usable again. However they say: In the longer…
Horst Walter
  • 13,663
  • 32
  • 126
  • 228
15
votes
3 answers

Context Menu Creation with ‪ Qt Designer(Qt Creator IDE)

How can i create a Context menu in Qt Designer (1.3)? Certainly I want to create it with out writing one line code!!