I´m doing 2 buttons one disabled the other one. To do that I have done the following that:
button.h
#ifndef BUTTONS_H
#define BUTTONS_H
#include <QWidget>
#include <QBuffer>
{
Q_OBJECT
public:
private slots:
void blocked();
};
#endif
#ifndef BUTTONS_H
#define BUTTONS_H
#include <QWidget>
#include <QBuffer>
class QPushButton;
class buttons: public QWidget
{
Q_OBJECT
public:
buttons(QWidget *parent = 0);
private slots:
void blocked();
};
#endif
To copy to clipboard, switch view to plain text mode
buttons.cpp
connect(deshabilitar, SIGNAL(clicked()),this, SLOT(blocked()));
void buttons:: blocked( )
{
Button7.setDisabled(true);
}
QPushButton *deshabilitar = new QPushButton(tr("deshabilitar"), this);
connect(deshabilitar, SIGNAL(clicked()),this, SLOT(blocked()));
QPushButton *Button7= new QPushButton(tr("Button7"), this);
void buttons:: blocked( )
{
Button7.setDisabled(true);
}
To copy to clipboard, switch view to plain text mode
Why am I having problems?
Bookmarks