Questions tagged [qt-slot]

53 questions
0
votes
1 answer

Connect slots from another class not working in Qt

I have this class in button.h: class Buttons : public QObject { Q_OBJECT public: Buttons(); QVector buttons; public slots: void getBtnInfo(); }; and in mainwindow.cpp, I connect like this: Buttons mButtons; for(int i =…
Theodore Tang
  • 831
  • 2
  • 21
  • 42
0
votes
1 answer

Qt 5.9 slot naming bug

I'm using Qt 5.9. I've a problem declaring slots with underscore style in particular when I name it with more then 2 underscores.For example with a void on_stop_treatment() slot, even I don't make a connection, I get QMetaObject::connectSlotsByName:…
0
votes
1 answer

Qt signal/slots and C++ Lambda expression

Why this doesn't work ? Class inherit from QObject b is Class child. bar is Foo child. void Class::method(Foo& b) { Bar* bar = b.getBar(); QObject::connect(bar, &Bar::s1, [&]{ auto x = bar->x(); // this line throw an exception read…
Houss_gc
  • 727
  • 5
  • 27
0
votes
2 answers

How to connect signal and slot without using connect function?

Is there a way to connect signal and slot without using connect function? If a way exists, please give some examples.
lens
  • 133
  • 1
  • 11
0
votes
1 answer

Slots and signals in Qt C++ in QTcpServer app

There is a question about slots and signals in Qt C++ in QTcpServer app. I am not very familiar with slots and signals approach. So ...the issue is slots for client socket on server app is not being invoked at all. I think that I use connect…
0
votes
0 answers

Pass signals and data from a class to another on Qt

I will post the code first as it will be easier to understand after that. Basically, I have a default class, MainWindow: mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include #include #include…
caffeine
  • 435
  • 7
  • 26
0
votes
1 answer

QT Connect QNetworkReply SIGNAL finished() not firing

I had a look at this link and except the signal spy and debugging i tried at least everything. I took the example from this site. I haven't set up the debugger for now. My problem is that i want to fire a custom slot and nothing is happening. I…
Eggi
  • 170
  • 1
  • 15
-2
votes
1 answer

Display data real time in QT c++ from db

Sth like this The project has a page with this schema: There is a QlineEdit in integer and a texBox(or can be use another widget) I want to Display the relevant cell of database(sqlite with query for example:select * frome dbName where…
erfnemati
  • 3
  • 4
1 2 3
4