Questions tagged [slots]

`__slots__` is a python language feature to reduce size of object instances by dropping the builtin dictionary every python instance normally features in order to support dynamic assignment of attributes and replacing it with a fixed set of attributes (the 'slots').

__slots__ is a python language feature to reduce size of object instances by dropping the builtin dictionary every python instance normally features in order to support dynamic assignment of attributes and replacing it with a fixed set of attributes (the 'slots'). See: https://docs.python.org/2/reference/datamodel.html#slots

306 questions
0
votes
2 answers

Connect a signal to two slots but execute only one slot at a time in Qt

I have a signal that I want to connect to two slots but execute just one slot at a time. That is to say I have two slots across different files and I want slot 1 to be called first. Later when I emit the same signal again, I want the slot 2 to be…
Adi
  • 89
  • 1
  • 1
  • 13
0
votes
2 answers

How different slots are being called by the same button?

For two days now I've been trying to understand why different slots are being called by the same button on my application. I've googled a lot about the subject but mostly what I found was regarding a unique SLOT being called multiple times by the…
Victor Oliveira
  • 3,293
  • 7
  • 47
  • 77
0
votes
1 answer

Qt Model and View - Link data from model to view, how?

I'm pretty new to the Model and View concept and I'm having trouble finding the right way to do this. So in my understanding the concept means, that I have one class that handles all the view (GUI) parts and an other class which handles the data…
0
votes
1 answer

Problems connecting Qlistwidget itemDoubleClicked signal with a slot

I am having problems conecting the itemDoubleClicked() signal with a slot in my qt program. I think that it should be working but something goes wrong. I define the GUI by Qt code. Here is the connection part of the…
Luis López
  • 137
  • 1
  • 2
  • 13
0
votes
1 answer

Cannot connect slots from another class

I currently try to write an little application for experiments and more. I write everything in its own file (Menu -> menu.cpp etc.). Now I want to create a menu action, this works but interacting with the action doesnt. Thats what I've done so…
Jan
  • 111
  • 1
  • 2
  • 4
0
votes
1 answer

QtQuick app and C++ slots binding error

I am in the process of learning of coding QtQuick applications using C++ on the background. My plan is to write as most as possible code in QtQuick (QML), but there is one thing I could not find, so I decided to use C++. Basically, I need to create…
0
votes
1 answer

Extend a QT QRadioButton Class to attach QSound::Play to a private slot

I've been playing around with QT5 for Android, I've been struggling a bit with extending an existing class so I can play a sound anytime I click on a radio button that has been promoted. I'm using the standard QT APP template to get started, This…
user2342062
0
votes
1 answer

How does the Qt Slots works. PySide

I am working with Qt I used to build GUI of my application, I understand the Signals, witch I am connecting to my def (functions) and that is working how I want to. But beside Signals are Slot, and I don't really get, what is the difference between…
user4175226
  • 23
  • 1
  • 7
0
votes
1 answer

Undefined reference to SOME_SIGNAL_NAME

I have some signal in my class, is called requestFinished. Also i have slot _finished, which should activate that signal. But i have error undefined reference to MY_SIGNAL. Here is _finished: void VK::_finished(QNetworkReply *reply) { if…
Efog
  • 1,155
  • 1
  • 15
  • 33
0
votes
1 answer

Signals and Slots Can Increase Coupling

OK, so signals and slots allow loose coupling connectivity between an object and method to another object and its method. This is fine but these signal slots objects exist as public members of a parent class and so their exposure undermines the…
Musky
  • 91
  • 1
  • 6
0
votes
0 answers

Slots with QGraphicPixmapItem

I created a class that derives from QObject and QGraphicsPixmapItem, my goal is to display multiple different fire images to make a kind of gif so I use a Timer and the connect function, but my images do not display and I have this…
Ary
  • 128
  • 1
  • 1
  • 11
0
votes
1 answer

Qt C++ Slot is not called when Signal is sent

After debugging, I'm sure that the replyFinish() slot is not called when I call this->getNetReply(). These are my files, in the main() fumction I call the getNetReply this way: Networking a; a.getNetReply(); I did add QT+=network to my qmake.…
Huy Ngo
  • 194
  • 10
0
votes
1 answer

Why do I get two clicked or released signals when using a custom slot for a QPushButton?

here's the main code at first I thought is was the message box but setting a label instead has the same effect. #include #include "ui_mainwindow.h" #include class MainWindow : public QWidget, private Ui::MainWindow { …
Chris Camacho
  • 1,164
  • 1
  • 9
  • 31
0
votes
1 answer

Why does Qt's .show() function take forever to load?

In my Qt application, I have the following code under a public slot: NewForm* newform = new NewForm(ui->frame_2); newform->show(); And it takes about 8 seconds for the form to open after the click() signal is emitted. All I have on the form…
Nickersoft
  • 684
  • 1
  • 12
  • 30
0
votes
1 answer

how to deal with slots that are gone

In a signal/slot system you connect a slot to a signal. The slot can be anything, a lambda object, that may go out of scope, an instance pointer/member function pointer pair, a function pointer. The latter slots cannot be invalidated. My question is…
user1095108
  • 14,119
  • 9
  • 58
  • 116