signals-slots Questions
3
Solved
I am reading through some documentation on PyQt5 to come up with a simple signal-slot mechanism. I have come to a halt due to a design consideration.
Consider the following code:
import sys
from ...
Geri asked 5/4, 2016 at 18:51
4
Solved
Depending on a conditions I would like to connect/re-connect a button to a different function.
Let's say I have a button:
myButton = QtGui.QPushButton()
For this example let's say I check if th...
Mucoprotein asked 5/2, 2014 at 19:27
4
Solved
I have got a loop. I created a QCheckBox and put it in a QTableWidget cell, and everything is Ok. In each step of loop I have called a connect function, for myslot SLOT, but only the last QCheckBox...
Mascia asked 22/10, 2013 at 6:44
2
There are signals valueChanged() and editingFinished(), but I need perform my action only when key enter is pressed.
Is there any solution without reimplementing event handler?
I need to change f...
Heteronym asked 28/3, 2016 at 16:17
5
According to the documentation the return value from a slot doesn't mean anything.
Yet in the generated moc code I see that if a slot returns a value this value is used for something. Any idea what...
Brasilin asked 22/9, 2008 at 2:12
4
Solved
I understand how to use it, but the syntax of it bothers me. What is "private slots:" doing?
I have never seen something between the private keyword and the : in a class definition before. Is ther...
Cloaca asked 5/2, 2012 at 7:19
2
Solved
I am trying to connect the click() signal of a button to my own function. The button is in a widget that I created with QT Designer. I load the .ui file with QUiLoader like so:
class MyWidget(QtGui...
Ophiolatry asked 5/1, 2012 at 16:23
2
Solved
I need to connect the valueChanged signal from QLineEdit to a custom slot programatically. I know how to do the connection by using Qt Designer and doing the connection with graphical interface but...
Lanfranc asked 14/12, 2013 at 16:52
4
Solved
I am attempting to send a structure via signals/slots between two threads, my signals/slots are connected properly and I have been able to send QStrings containing parts of my data but now I need t...
Lenticular asked 14/9, 2016 at 16:57
2
I am trying to connect a signal to a signal using the new syntax:
connect(ui->line,&QLineEdit::returnPressed,ui->button,&QPushButton::clicked);
But the compiler throws an error, wi...
Eakins asked 2/6, 2020 at 10:35
6
Solved
I want to send a Signal from C++ to a Slot in my QML File.
I already got it working without and primitive type parameters, although if I want to send a QString to my QML Slot I get an error whilst ...
Dalliance asked 12/1, 2012 at 11:14
4
I'm new in Qt and have a question.
I have QLabel and QLineEdit objects, and when QLabel text is clicked on, I want to set this text in QLineEdit.
Also I have read that QLabel has not clicked sign...
Holmgren asked 14/8, 2015 at 21:31
3
Solved
Consider this JS code:
function handleSig() {
emitter.someSig.disconnect(handleSig);
// do some work here
}
emitter.someSig.connect(handleSig);
Can it be written without the explicit disconne...
Joacima asked 10/7, 2017 at 18:15
2
Solved
I want to use signals and slots in my program, but unfortunately they should be used for transmitting several different data types (e.g. QString, double, etc.) and I don't want to write twenty diff...
Sixteenmo asked 15/11, 2014 at 21:6
3
Solved
My GUI project in Qt has a lot of "configuration pages" classes which all inherit directly from QWidget.
Recently, I realized that all these classes share 2 commons slots (loadSettings() and saveS...
Fleischer asked 8/6, 2010 at 14:27
2
Is there any way to use Qt5 style Signal & Slot connection if the signals are declared in interfaces ?.
My Interfaces:
class IMyInterfaces{
protected:
IMyInterfaces() {} //Prohibit instanti...
Lowis asked 30/9, 2015 at 22:41
3
Solved
I am using Python 3.4 with Pyside 1.2.4 and PyQt 4.8.7 and when I try to connect a Signal to a Slot it says:
'PySide.QtCore.Signal' object has no attribute 'connect'
Im am using MVC:
Model:
...
Saudra asked 11/4, 2016 at 21:37
5
Solved
I've created a checkbox that's also a QTreeWidgetItem using the code below.
//Populate list
QTreeWidgetItem *program = createCheckedTreeItem(QString::fromStdString(itr->first), true);
treeProg...
Lyssa asked 13/3, 2012 at 15:4
3
Solved
Newbie to C++ here. I was reading A Deeper Look at Signals and Slots, which claims that 1) callbacks are inherently type-unsafe, and 2) to make them safe you need to define a pure virtual class wra...
Summitry asked 12/12, 2015 at 6:52
4
Solved
Problem: When exceptions are raised in slots, invoked by signals, they do not seem to propagate as usual through Pythons call stack. In the example code below invoking:
on_raise_without_signal():...
Debroahdebs asked 20/8, 2017 at 22:13
4
Solved
Qt v4.8.0, VC2010 compiler
I have a QMainWindow based class and I'm trying to send it signals involving QUuid
However, every time I run it I get the errors:
Object::connect: No such slot MainWin...
Byrann asked 18/5, 2012 at 16:38
3
Solved
Is there any possibility to create signals at runtime when needed?
I'm doing something like this in a function:
class WSBaseConnector(QObject)
def __init__(self) -> None:
super(QObject, sel...
Digenesis asked 11/5, 2018 at 14:33
5
We lose a lot of time when using a connect from/to a non-existing signal/slot, because Qt only warns us at runtime somewhere in the console logging.
Apart from evolving to Qt5, which uses the type...
Georgiana asked 25/4, 2014 at 7:16
2
Solved
Where are the signals itemChecked and itemUncheсked on the QTreeWidget?
Qt Signals: (quote from PyQt4 QTreeWidget documentation page)
void currentItemChanged (QTreeWidgetItem *,QTreeWidgetItem *)...
Phrasing asked 1/12, 2012 at 17:49
2
Short question:
Can signal handlers memory leak.
Long question:
In C#, if I attach a handler to an event
left_object.left_event += right_object.right_handler
Then I need to remove the h...
Ophiolatry asked 12/5, 2017 at 11:54
1 Next >
© 2022 - 2024 — McMap. All rights reserved.