Android: Child widgets appears in parent even hide is called



  • Hi all,

    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 im 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...



  • I think nobody can answer that without having the source codes of the two widgets.

    However, you could try with a Pushbutton or any other widget. If that works (and I know that it works) then you will probabyl find a bug in the widget itself.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.