Questions tagged [qt-slot]
53 questions
1
vote
2 answers
QProgressBar connect progress between classes - "no matching function for call"
I have some troubles in correct set of Signal and Slots between one class in which I do some calculations and the other one which contain GUI with my progress bar. I have very small experience with qt so I don't feel well how the signal/slots works.…

Karls
- 731
- 7
- 17
1
vote
2 answers
Qt custom SLOT of subclass not recognised by CONNECT
Background
I am writing a media player application in Qt. I have subclassed QMediaPlayer and created a new SLOT which is capable of interpreting an int and passing it as qint64 to QMediaPlayer::SetPosition(qint64).
QMediaPlayer::PositionChanged…

DWD
- 422
- 5
- 16
1
vote
1 answer
PyQt5 dialog closes main window
I am trying to convert PyQT4 code to PyQt5 which requires new style of connecting signals.
When I use:
self.connect(okButton, SIGNAL("clicked()"),form, SLOT("accept()"))
self.connect(cancelButton, SIGNAL("clicked()"),form,…

tmdag
- 531
- 6
- 17
1
vote
1 answer
Qt: multiple menus share the same actions but connect to different slots
I have two menus with the same actions. But I would like to connect them to different slots depending on the menu. Can I do that?
The code below fails to do it, instead, it connects the actions to both slots.
I can create a different set of…

azalea
- 11,402
- 3
- 35
- 46
1
vote
1 answer
'QML Connections: Cannot assign to non-existent Property' despite the opposite being true
So, I checked the following questions, which seemed most similar to my existing problem:
QML: Using cpp signal in QML always results in "Cannot assign to non-existent property"
Unfortunately that did not help. (Nor did any other solution that I…

Duck Dodgers
- 3,409
- 8
- 29
- 43
0
votes
0 answers
Uncertainty in QT ideal Signal and Slot Communication time over queued connection
I wondered about uncertainty in QT signal and slot communication mechanism timings over the queued connection. My signal and slot (respective objects) live in two different threads, As part of benchmarking signals is emitting from a Worker thread…

Suresh
- 1
- 3
0
votes
2 answers
Qt C++, connect class instance signal to Widget main class
My code contains a function which takes a lot of time to compute. To make it feel more responsive, I wanted to visualize every tenth of the progress with a progress bar. However, the function is implemented in another class other than my Main Widget…

infinitedreamer666
- 51
- 5
0
votes
1 answer
How to pass a function pointer to a method so that it can be used in Qt's connect()?
Background: I want to dynamically create the structure of a context menu and pass the slot of the action items to the method that creates the context menu.
The actual slot is in a QWidget class. I have tried different solutions by passing a function…

BodyFit
- 1
- 1
0
votes
2 answers
QObject::connect cant connect signal to a slot of *this* object
The title might be hard to understand, sorry for that.
I have problem connection signal to slot. There are no compile errors, but the connect returns false.
There is error line printed in the console:
QObject::connect: No such slot…

Jakub Matěna
- 107
- 2
- 12
0
votes
1 answer
Qt Pushbutton must process the signal after a delay
I am using a push button which records incoming microphone sound signal. Usually, the signal arrives a little late after pressing the record button and my recorded output contains zero until 10 ms(after which i receive an actual output). I am using…

neo_v
- 41
- 7
0
votes
4 answers
C++ Qt Signals and Slots
I have difficulty connecting to SLOTs defined in a different class. I have 2 classes - Computations and MainWindow. MainWindow is supposed to handle the GUI part of the program only and Computations handles the calculations. I am creating a…

Elmon
- 9
- 2
0
votes
1 answer
PySide Signals not being sent to Slot, from QThread object
I'm working with a multi-threading application, where a worker thread gets created, that emits a signal.
After creating the thread, I connect the signal with an object slot, that will perform some action.
The problem, is the object slot, is not…

Mário Costa
- 93
- 1
- 6
0
votes
1 answer
Executing dynamically created buttons
In my qt c++ application I create buttons dynamically based on the contents of a QStringList(i.e number of buttons is equal to the number of elements in the QStringlist and the text of the buttons are the elements in the list).
following is my…

Kushan Peiris
- 167
- 3
- 15
0
votes
1 answer
Automatically create QStackedWidget pages based on Tuple
I'm fairly new to python, and I feel this is an advanced question, with that in mind it might be out of the scope of Stack Exchange. Please bear with me.
I have a QTreeWidget and QStackedWidget. I have populated the QTreeWidget using a…

artomason
- 3,625
- 5
- 20
- 43
0
votes
1 answer
Connecting signal and slot not working Qt
I mostly copied, pasted the code from Here, and implemented them in a small new program like this:
In mybutton.h:
class MyButton : public QPushButton
{
Q_OBJECT
public:
MyButton(QWidget *parent = Q_NULLPTR);
QVector…

Theodore Tang
- 831
- 2
- 21
- 42