Sergio_Almonte
30th November 2007, 14:14
heello people!
I´m trying to make an aplication with a window with 2 "areas". when the aplication is loaded, I want to show only the "normal" area, and when the button "config" is pressed, I want to make big the window, so it shows the controls of the second area. I have read the documentation and I know that width() function or resize() function does it,
void C_Interfaz::on_ButtonConfig_released()
{
C_Interfaz::ui.Interfaz->geometry.width(488, 266);
}
but I´m quite new in OOP and then when I try to implement this, come an error:
interfaz.cpp: In member function 'void C_Interfaz::on_ButtonConfig_released()':
interfaz.cpp:38: error: invalid use of 'class Ui::Interfaz'
my main function is like this:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
C_Interfaz Interfaz;
Interfaz.show();
return a.exec();
}
and my class constructor is:
class C_Interfaz: public QWidget
{
Q_OBJECT
public:
C_Interfaz
(QWidget *parent=0,
Qt::WFlags flags=0);
~C_Interfaz();
Ui::Interfaz ui;
private slots:
void on_ButtonConfig_released();
};
could you help me to find my mistake??
thanks!!
I´m trying to make an aplication with a window with 2 "areas". when the aplication is loaded, I want to show only the "normal" area, and when the button "config" is pressed, I want to make big the window, so it shows the controls of the second area. I have read the documentation and I know that width() function or resize() function does it,
void C_Interfaz::on_ButtonConfig_released()
{
C_Interfaz::ui.Interfaz->geometry.width(488, 266);
}
but I´m quite new in OOP and then when I try to implement this, come an error:
interfaz.cpp: In member function 'void C_Interfaz::on_ButtonConfig_released()':
interfaz.cpp:38: error: invalid use of 'class Ui::Interfaz'
my main function is like this:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
C_Interfaz Interfaz;
Interfaz.show();
return a.exec();
}
and my class constructor is:
class C_Interfaz: public QWidget
{
Q_OBJECT
public:
C_Interfaz
(QWidget *parent=0,
Qt::WFlags flags=0);
~C_Interfaz();
Ui::Interfaz ui;
private slots:
void on_ButtonConfig_released();
};
could you help me to find my mistake??
thanks!!