Hello,
I'm starting to get the hang of QT. I found an older tutorial that has really helped me but there are some differences between version 2.3 and 4.3 which need addressing. In version 2.3 (the one my tutorial was written for) you could easily connect slots that didn't already exist in the Designer and then define them later in code. In 4.3 how can you connect slots that aren't preprogrammed in the Designer?
Another related question: I have a MainWindow form with a menu. The menu has one field called Actions and the Actions menu has one action called: connect.
When connect is clicked I want to activate my connect socket code. Could someone possibly outline the .h file I'd need for this? I'm confused about the sub-classing involved.
Here's what I'm thinking:
#ifndef MCHAT_H
#include "ui_MChat.h"
Q_OBJECT
public:
private slots:
/* Somehow tell action_Connect() that it should call this slot
when activated() is signalling */
virtual void connect();
#endif MCHAT_H
#ifndef MCHAT_H
#include "ui_MChat.h"
class MChat : public QMainWindow {
Q_OBJECT
public:
MChat(QMainWindow *parent = 0);
private slots:
/* Somehow tell action_Connect() that it should call this slot
when activated() is signalling */
virtual void connect();
#endif MCHAT_H
To copy to clipboard, switch view to plain text mode
Bookmarks