I am having a main widget and multiple child widgets to show.
I add all child widgets to the main widget layout and call show of only one child and hide others.
In windows PC this works fine. But in android the child widget appears even if hide is invoked. Can anyone suggest where I'm wrong.
#include "mainframe.h"
#include "ui_mainframe.h"
MainFrame::MainFrame(QWidget *parent) :
QWidget(parent),
ui(new Ui::MainFrame)
{
ui->setupUi(this);
m_pMainLayout = ui->gridLayout;
initialize();
}
MainFrame::~MainFrame()
{
delete ui;
}
void MainFrame::initialize()
{
m_pStartupScreen = new StartupScreen(this);
m_pSystemScreen = new SystemScreen(this);
m_pMainLayout->addWidget(m_pStartupScreen);
m_pMainLayout->addWidget(m_pSystemScreen);
connect(m_pStartupScreen, SIGNAL(reportsButtonClick()),
this, SLOT(handleUserOptionReports()));
connect(m_pStartupScreen, SIGNAL(systemButtonClick()),
this, SLOT(handleUserOptionSystem()));
connect(m_pStartupScreen, SIGNAL(salesButtonClick()),
this, SLOT(handleUserOptionSales()));
m_pSystemScreen->hide();
m_pStartupScreen->show();
connect(m_pSystemScreen, SIGNAL(closeInvoked()), m_pStartupScreen, SLOT(show()));
}
m_pStartupScreen
and m_pSystemScreen
appears in android devices, ie, both child widgets appears overlapped.