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
1 answer

Attribute error: ImageDialog Object has no attribute. PyQt5

I am trying to add Maccept method to the ImageDialog class and connect this to okButton. However when I compile this code it will give : AttributeError: 'ImageDialog' object has no attribute 'Maccept' But I have already defined Maccept method inside…
dundar yilmaz
  • 141
  • 1
  • 6
0
votes
1 answer

How to connect signal from qconcurrent thread to gui thread sharing one string

I'm trying to update gui label with an other thread information (QString). class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); public Q_SLOTS: void sl_appendInfo(QString…
smashup3d
  • 3
  • 2
0
votes
0 answers

Qt C++ SLOT on_returnPressed on_OK_ckicked strange behavior

I have a strange behaviour with one of my ui`s: In my ui I have a lineEdit Shift_x and a Button pb_OK. When I do the following I have different behaviour: Edit + RETURN: When I edit the value in Shift_x and press return the slot…
user3443063
  • 1,455
  • 4
  • 23
  • 37
0
votes
2 answers

Qt Change label text from another class

i'm trying to change the label text of Class A via Class B using Qt but i can't get it working, here's my codes: Class A: #include "mainwindow.h" #include "ui_mainwindow.h" #include "loldata.h" using namespace std; MainWindow::MainWindow(QWidget…
0
votes
2 answers

vuejs v2 pass data to component and update parent when changed

What I want to build is a Form which can detect errors from its Inputs. The inputs are rendered (in my current setup) in a section in the form. But after hours of work, it doesn't work. What is the best approach to make the concept will work?…
Stefanius
  • 117
  • 1
  • 10
0
votes
1 answer

qt multiple instances of custom widget fail to excecute their slots

I'm developing a gui in qt5.7 with qtcreator. I made a widget that contains check-boxes and combo-boxes to represent the same number. I use the signal toggled() to set the new index in the combobox. Then I do the same with the currentIndexChanged()…
0
votes
1 answer

Distinct time slots from multiple intersecting intervals

I have the following time slots within a single day: 1) 9:00 to 13:00 2) 9:30 to 10:30 3) 9:30 to 10:30 (this interval is intentionally here 2x) 4) 11:00 to 12:00 I can visualize the time slots on a horizontal time line: Timeslot 1) …
Ivan
  • 1
  • 2
0
votes
1 answer

Issues using slots and signals when connecting two windows in Qt using PyQt

I am having trouble passing a line of text from one LineEdit in a window to a lineEdit in another window by clicking a button. I have read multiple examples but I can't seem to get the signal to display on the second window. This is a very paired…
Austin B.
  • 1
  • 1
0
votes
1 answer

C++ boost signals and slots with different parameters?

Can a C++ signal be linked to slots with different parameter lists? i.e. one slot takes 1 parameter, the other one takes 2, etc... And you then call that signal with 1 or 2 parameters and it calls the corresponding slot?
Toshiro
  • 345
  • 2
  • 5
  • 14
0
votes
2 answers

C# how to make image move on Y axis like in slots (WPF)

How can i make image move on Y axis from top to bottom like in slots ? I have i my WPF this:
0
votes
1 answer

changing QTextEdit content during 'onTextChange()' signal

We have some code: void MainWindow::textChangedListener(){ QTextEdit* dock = qobject_cast(QObject::sender()); dock->setText("asd"); } And a signal: cout << connect(it->silaTextEdit, SIGNAL(textChanged()), this,…
user6053837
0
votes
0 answers

Using __setattr__ + __slots__ in a python3 class

I am trying to be all fancy with sub element attribute access in a custom class hierarchy. My fanciness works in that I can successfully use descriptors to do this. I want to be even more fancy and make the class RefHolder (shown below in the…
Gregory Kuhn
  • 1,627
  • 2
  • 22
  • 34
0
votes
2 answers

QT Creator: Trigger a Slot with Code?

I may have worked myself into a corner but this sounded to me like a good idea at the time. I have been developing an interface that permits a user to modify settings of a robotic device, i.e. speed, directions, force, etc. with a very large…
Mike
  • 11
  • 2
0
votes
1 answer

QTcpSocket readyRead() signal emits multiple times

I'm new to Qt and currently learning to code with QTcpServer and QTcpSocket. My code to process data is like Myclass() { connect(&socket, &QTcpSocket::readyRead, this, &MyClass::processData); } void MyClass::processData() { /* Process the…
Ryan
  • 373
  • 4
  • 15
0
votes
1 answer

QVector connection thread cannot queue arguments of type

I have problem. I have a custom class BasicSpace. This class isntt qobject (don't have macro) and don't inherit by qobject. It is simple class with some data, qtime etc. I…
Kirk Brodie
  • 42
  • 1
  • 7