I have two classes that share the same ui.One is the main class called classM and other a sub class of classM called classS.
I am able to effect he ui in classM and get data from the ui(i have a line edit and a few more such input widgets)
But when i try to change the ui from the sublcass classS, it does nothing. It doesnt show any errors eother, but always gives back a blank string for text command in line edit.
This is the header of classM
namespace Ui
{
class classMui;
}
{
Q_OBJECT
private:
Ui::classMui *ui;
namespace Ui
{
class classMui;
}
class classM : public QMainWindow
{
Q_OBJECT
private:
Ui::classMui *ui;
To copy to clipboard, switch view to plain text mode
This is the header of classS
namespace Ui
{
class classMui;
}
{
Q_OBJECT
private:
Ui::classMui *ui;
namespace Ui
{
class classMui;
}
class classS : public QMainWindow
{
Q_OBJECT
private:
Ui::classMui *ui;
To copy to clipboard, switch view to plain text mode
ui->passEdit->text();;
I am able to get text for this same code in classM, where as in classS, it gives me a emty string.
what am i doing wrong?
Bookmarks