Questions tagged [qtwidgets]

Questions related to the QtWidgets module in Qt 5 that provides a set of UI elements to create classic desktop-style user interfaces.

The widget set of UI elements was put into its own module to keep Qt Gui modularized and less cluttered for GUI application using Qt Quick and so on.

The official documentation of this module can be found here.

Tagging recommendation:

You will often see questions tagged specifically as for QWidget, et cetera because the question is Qt 4 related even though it is about widget classes. From Qt 5 onwards, please try to use this tag for those cases. Make sure that you only tag questions with that contain questions about the core part of Qt Gui.

300 questions
0
votes
1 answer

Qt - how to use layouts in Qt designer

I have some troubles in using layouts. as you know Qt designer has some layouts by default but they cant help me. in the widgets bar in layouts section there are some customized layouts but I cant use them , they are actually do nothing when i…
user4000670
0
votes
1 answer

Dynamically create new instances of a custom widget & connect signals & slots (Qt)

PART A: I have created a widget called Panel which I'd like to iteratively make new instances of. so, for example, it would look something like: Panel *panelArray[10]; for(int i=0;i<10;i++) panelArray[i] = new Panel(this); would this be the…
Rachael
  • 1,965
  • 4
  • 29
  • 55
0
votes
0 answers

How to enable resizing of a window in Qt

I'm new to Qt and I'm trying to figure out a way to auto-resize in Qt. The goal is for the user to be able to drag the window to make it bigger and everything resizes to the size of the window. Does anyone have any tips?
user3878223
  • 441
  • 3
  • 7
  • 15
0
votes
3 answers

Refactoring / partitioning of Qt GUI widget source file

I have created a traditional Qt (widget based) GUI, something like this: MainWindow::MainWindow(parent) : QMainWindow(parent) This is designed by Qt Creator as forms (mainwindow.ui), aka Design Mode. Everything works fine. But the GUI code with all…
Horst Walter
  • 13,663
  • 32
  • 126
  • 228
-1
votes
1 answer

Been writing a notepad clone with QT6 c++, but every time I save the file, it creates the file empty without the text from TextEdit;

So I am writing the code for a notepad clone which I hope would evolve into a final draft clone in further updates, and I am using it as a tool to learn C++ and QT as I am still Quite a beginner with the langauge. I have implemented a save function…
Zayn Mady
  • 9
  • 2
-1
votes
1 answer

QT5 custom widget with .ui file - calling Ui::myWidget.setupUi required when displaying it

I created QT custom widget MyWidget with a .ui file. But when I place QWidget to MainWindow in QT designer and promote it to MyWidget, it just renders an empty widget. I figured out why it doesn't work. In generated file ui_mainwindow.h in function…
FireFragment
  • 596
  • 1
  • 4
  • 15
-1
votes
1 answer

why can't my list save everything in the QListWidget?

I am creating a to-do list application that can save for each day (if you get into the application).And there seems to be a problem. here is my code: import PySide6.QtWidgets as qtw import PySide6.QtCore as qtc import sys import pandas as pd class…
Sean
  • 17
  • 9
-1
votes
1 answer

calling of class function inside another class in python

I recently started learning Python + PyQt5. Please help me understand how calling of class function inside another class in python. I have the following code from PyQt5 import QtGui, QtWidgets, QtCore, uic from PyQt5.Qt import * class…
-1
votes
1 answer

How to alter Qt Widgets in WINAPI threads?

I need to alter three progress bars simultaneously in three WINAPI threads. Since my funtions, that change value of progress bars are to have access to these bars, they are members of MainWindow class. So i created wrappers with signature that is…
ventisk1ze
  • 61
  • 1
  • 7
-1
votes
1 answer

How to run animation with blocked UI thread in Qt Widgets app?

In QML you can use Animator type to "animate on the scene graph's rendering thread even when the UI thread is blocked." How can I achieve the same thing for Qt Widgets? Basically, I want something like: 1) start loading screen / splash-screen 2)…
sthlm58
  • 1,142
  • 1
  • 9
  • 28
-1
votes
1 answer

Switching between windows. Qt Widgets ( 1 widget in memory )

For example I have 2 widgets and I press button on first widget. I need to delete first widget and create new widget. How is it possible? I mean some structure for this. I used stackedwidgets, but pages from stackedwidgets located in memory. I need…
-1
votes
1 answer

What is QT-Creator's equivalent to WinForms Dock-Fill?

I have a QTreeView widget placed inside a QDockWidget: I want to set the properties of the QTreeView, that it automatically fills the whole available client drawing area (similar as WinForms DockFill property). How can this be achieved with the…
πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
-2
votes
2 answers

pyqt5 - update a dynamically created widget with its corresponding data

I have created a tool with help of a custom widget. This widget fits into the main window like so. User can create new instances of custom widget with a click of a button. custom widget : class RenderWidget(QWidget): def __init__(self,…
nish
  • 1,008
  • 4
  • 17
  • 34
-3
votes
2 answers

What is the best way to determine if the QTextEdit in my QT app is empty or not?

there's a text editing widget in my QT Widget application. My menu item checks to see if the text edit below is empty. Thus, I'm trying to create a function that checks and returns true/false depending on the situation. Can anyone help me?
user16918989
-3
votes
1 answer

Qt application crashes in widget destructor

I am having a crash in main window QWidget destructor on the line below. For some unknown reason, d->focus_next contains a dangling pointer. Anyone has any tips what could be causing it?
Danol
  • 368
  • 1
  • 15
1 2 3
19
20