A QSignalMapper is a class from the Qt Toolkit which bundles signals from identifiable senders.
Questions tagged [qsignalmapper]
25 questions
97
votes
6 answers
Passing an argument to a slot
I want to override mouseReleaseEvent with a bunch of QActions and QMenus...
connect(action1, SIGNAL(triggered()), this, SLOT(onStepIncreased()));
connect(action5, SIGNAL(triggered()), this, SLOT(onStepIncreased()));
connect(action10,…

Fatih Arslan
- 1,054
- 1
- 9
- 10
11
votes
2 answers
How does QSignalMapper work?
After my post here : Associate signal and slot to a qcheckbox create dynamically I need to associate :
• The signal clicked() when I click on a qCheckBox to my function cliqueCheckBox(QTableWidget *monTab, int ligne, QCheckBox *pCheckBox)
To do so,…

Evans Belloeil
- 2,413
- 7
- 43
- 76
4
votes
2 answers
pyqt: A correct way to connect multiple signals to the same function in pyqt (QSignalMapper not applicable)
I've ready many posts on how to connect multiple signals to the same event handler in python and pyqt. For example, connecting several buttons or comboboxes to the same function.
Many examples show how to do this with QSignalMapper, but it is not…

Grigory Makeev
- 391
- 3
- 5
3
votes
1 answer
Using QSignalMapper
I tried to make a simple example to help understand how the concept of QSignalMapping works in PySide. I would like to dynamically create a series of buttons by iterating through a loop, and when the user pushes one of the buttons, I can activate a…

winteralfs
- 459
- 6
- 25
2
votes
1 answer
How to use QSignalMapper with QActions created dynamically?
I'd like to create a dynamic menu which enumerates all QDockWidget from my QMainWindow and allows to show/hide the QDockWidgets, so far I got this code:
class PluginActionsViewDocks():
def __init__(self, main_window):
self.main_window =…

BPL
- 9,632
- 9
- 59
- 117
2
votes
3 answers
Passing a QString to a class method of parent with QSignalMapper
I have a parent class with its method to change a labels picture on certain Signals. E.g. When something happens in a QComboBox... (valueChanged, activated)
class parentClass : public QMainWindow
{
Q_OBJECT
...
public…

tobilocker
- 891
- 8
- 27
1
vote
2 answers
Using QSignalMapper for communication between QGraphicsItems
The code below shows my attempt to get several movable VerticalLineSegment objects (derived from QGraphicsLineItem and QObject) to signal one (using a QSignalMapper) another when they move. I'd appreciate help as to why the VerticalLineSegment slot…

Olumide
- 5,397
- 10
- 55
- 104
1
vote
2 answers
Best way to use QSignalMapper
I am using QSignalMapper with Qt 4.8. Now I am making network requests like below:
// start the request
QNetworkRequest request(url);
QNetworkReply* reply = networkManager->get(request);
// connect signals using QSignalMapper
QSignalMapper*…

Hbi Giu
- 113
- 1
- 9
1
vote
3 answers
Pass multiple arguments to slot
I'm currently working on a game with a friend of mine, and now we are kind of stuck. We need to pass two arguments to a slot. I want to use one slot for two buttons, and one of the buttons will be used for adding, and the other one for subtracting.…

Dromnes
- 302
- 2
- 3
- 12
1
vote
1 answer
Trouble Understanding Signal Mapper PyQt
So I am generating a menu of options based on some files on my system. I have a list list of objects I need to dynamically generate an option in the menu for and need to be able to let the function that is doing the creation know which object to…

jspada
- 481
- 1
- 6
- 24
0
votes
1 answer
How to place my function using QSignalMapper and QObject::connect
I'm a beginner in c++.
i'm trying to pass an argument using QSignalMapper. I do something like this:
int main(int argc, char** argv)
{
...
QSignalMapper * mapper = new QSignalMapper(0);
QObject::connect(mapper,SIGNAL(mapped(int )), 0…

Pola
- 33
- 5
0
votes
1 answer
Try to understand QSignalMapper with custom Object
I am trying to understand the QSignalMapper. I got how to map a button click with the slot that handles str. I was trying to map a QObject to do the same, but it keeps failing. Am I doing something wrong or did I miss understanding something ?
class…

Ansh David
- 654
- 1
- 10
- 26
0
votes
1 answer
Working QSignalMapper code is clumsy to read
I read the documentation of QSignalMapper and I've ended up with this code:
_mapperOn.setMapping(ui->btnRelayOn1, 1);
_mapperOn.setMapping(ui->btnRelayOn2, 2);
_mapperOn.setMapping(ui->btnRelayOn3, 3);
_mapperOn.setMapping(ui->btnRelayOn4,…

Mark
- 4,338
- 7
- 58
- 120
0
votes
0 answers
I am getting a "No such signal error" when using QSignalMapper under Linux
No such signal QSignalMapper::mappedString(QString)` is the exact error
I am working on an effect engine plugin for OpenRGB but I have run into some issues with Linux
QCheckBox* SelectedBox = new QCheckBox();
QSignalMapper* DeviceSelectionMapper =…

CoffeeIsLife
- 21
- 1
0
votes
0 answers
how to use clicked.connect() with a signalmapper in python3.7 and PyQt5
I want to call a method when a button is pressed using clicked.connect() . Method should simply output text inside the clicked button.
import sys
from PyQt5.QtCore import QSize, QSignalMapper
from PyQt5.QtWidgets import QApplication, QMainWindow,…

sticki
- 43
- 1
- 8