signals-slots Questions
1
Here is how Qt signal/slot connection works:
Direct Connection The slot is invoked immediately, when the signal is emitted. The slot is executed in the emitter's thread, which is not necessarily ...
Dickinson asked 18/9, 2017 at 13:42
2
Solved
Is there any way to prevent or discourage the use of the old Signal-Slot syntax from Qt4 in projects solely written in Qt5?
In our current project, there are no occurrences of the old syntax and I...
Callisthenics asked 5/9, 2019 at 10:39
3
Solved
I would like to have a pyqt signal, which can either emit with a python "object" subclass argument or None. For example, I can do this:
valueChanged = pyqtSignal([MyClass], ['QString'])
but not ...
Magdau asked 21/8, 2012 at 7:48
5
Solved
I can imagine that there might be quite a few of them depending on the event, but at the same time, I guess this can be a best way to debug, and an interesting lesson.
Why would I need it? I'm usi...
Dur asked 15/1, 2010 at 14:4
1
Solved
I am building a small interface where I subclassed RViz which is a visualizer from ROS. According to the official documentation it is possible to re-use and re-implement some of the functions prese...
Elamitic asked 15/6, 2019 at 16:8
3
Solved
I repeatedly see people having problems with slots not being called. I would like to collect some of the most common reasons. So maybe I can help people and avoid a lot of redundant questions.
Wha...
Rotarian asked 17/10, 2014 at 9:37
2
Solved
I have a class that has a signal with this signature:
// CLASS A
signals:
void requestToChangeRange(voltage_range_e vr, current_range_e cr, uint16_t bits);
There is another class which has a sl...
Rustyrut asked 17/4, 2019 at 9:8
3
Solved
I have the following code that performs a background operation (scan_value) while updating a progress bar in the ui (progress). scan_value iterates over some value in obj, emitting a signal (value_...
Emlin asked 23/12, 2013 at 22:30
4
I want to emit a signal from a C++ thread (std::thread) in Qt.
How can I do it?
Lapin asked 27/7, 2014 at 15:14
1
I am creating my documentation using doxygen and enabled the INHERIT_DOCS option. This works fine for normal methods. The documenation of the base class will apear in the class the re-implements th...
Electrolytic asked 10/1, 2016 at 12:8
3
Solved
Qt documentation states that signals and slots can be direct, queued and auto.
It also stated that if object that owns slot 'lives' in a thread different from object that owns signal, emitting su...
Phlebosclerosis asked 12/3, 2009 at 11:38
2
I would like to know what are the consequences of emitting a signal from a regular python thread within a QObject, compared with a QThread.
See the following class:
class MyObject(QtCore.QObject)...
Cru asked 5/6, 2015 at 22:16
3
Solved
I'm currently working with a lot of custom widgets which provide different signals and slots for communicating with each other.
E.g. there is one widget which establishes a network connection and ...
Arvid asked 28/11, 2010 at 11:14
4
Solved
I am trying to code a static callback function that is called frequently from another static function within the same class. My callback function needs to emit a signal but for some reason it simpl...
Ujiji asked 23/2, 2012 at 10:26
3
Solved
Qt uses signals and slots for object communication. Signals are normally declared as a member function and the Qt MOC then generates the definition of that function.
What I would like to understan...
Counterbalance asked 1/9, 2016 at 22:21
4
Solved
Debugging signals and slots can be hard, because the debugger does not jump to the slots of a signal when it is emitted. What are some best practices for debugging Qt signals and slots?
In particu...
Cordelia asked 13/8, 2012 at 16:38
3
Solved
I'm using Qt Designer and pyqt code to write an app.
I have a very simple question: in my UI I have 2 checkboxes and what I need is to set the first checkbox as always unchecked when the second ch...
Clausewitz asked 29/3, 2016 at 10:1
2
Solved
I'm using pyqt5, and I have several methods connected using code similar to the following:
self.progress.canceled.connect(self.cancel)
Where, for example, self.cancel is:
def cancel(self):
sel...
Mancy asked 30/10, 2016 at 4:7
5
Solved
Lets say I have a main window with a slider and a widget inside that window with a method called setValue(int). I'd like to call this method every time the value of the slider has changed.
Is ther...
Manufacturer asked 19/2, 2014 at 23:56
5
Solved
Following example from this link: http://developer.kde.org/documentation/books/kde-2.0-development/ch03lev1sec3.html
#include <QObject>
#include <QPushButton>
#include <iostream>...
Bismuthinite asked 2/5, 2011 at 7:41
2
Solved
We have an application that executes different queries. It starts up to four threads, and runs the extractions on them.
That part looks like this:
if len(self.threads) == 4:
self.__maxThreadsMs...
Yacketyyak asked 6/2, 2018 at 12:29
1
I used below syntax in Qt5 according to new connect syntax to avoid type mismatches of slot and signals for a a QListWidget with checkable items.
connect(item, &QListWidget::itemChanged,this ,...
Swat asked 2/1, 2018 at 11:3
1
Solved
Suppose I have an object and want one of its methods to be executed when a PyQt signal is emitted. And suppose I want it to do so with a parameter that is not passed by the signal. So I create a la...
Humpy asked 22/12, 2017 at 12:40
4
A simple question regarding the new signal/slot syntax in Qt5:
Are there still benefits for a Q_OBJECT-derived class to have public slots: sections declared?
Note: With the new syntax you're able...
Reposeful asked 9/11, 2017 at 8:1
6
I'm making a little chat messenger program, which needs a list of chat channels the user has joined. To represent this list graphically, I have made a list of QPushButtons, which all represent a di...
Manilla asked 7/2, 2011 at 23:20
© 2022 - 2024 — McMap. All rights reserved.