You are not logged in.

1

Thursday, July 18th 2013, 1:28pm

signals and slots

Hello Everyone,
I wrote a Qt TCP Client function and I invoke receive function when signal is generated by readyread() function but I couldn't find any function for invoking my send function unlike readyRead(),I wrote the following code for receive function:

connect(&client, SIGNAL(readyRead()),

this, SLOT(receive()));

and now I want to write a function for send(const char*) function but I couldn't get function to declare in SIGNAL().

Can any one help me?

This post has been edited 1 times, last edit by "satya144" (Jul 18th 2013, 1:45pm)


_Blueman

Intermediate

  • "_Blueman" is male

Posts: 196

Location: Poland

  • Send private message

2

Thursday, July 18th 2013, 6:21pm

simple class example

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
private:
    Ui::MainWindow *ui;

public slots:
//some public slots

private slots:
//some private slots

signals:
//some signals

};