The view of new window appears in area of old window.



  • Hi,

    When im creating new window with "this" in CTOR then view appears in area of old window. Check code below:

    void Login::on_AddNew_clicked()
    {
        AddUser *newuser = new AddUser(this);
        newuser->show();
    }
    

    Im wondering about this bug because for different windows it works ok (new window is generated). Example below:

    void Login::on_GoIn_clicked()
    {
          if( /* whatever */ )
                      //hide();
                      MainWindow *main = new MainWindow(this);
                      main->show();
          }
    }
    

    I dont what to create private ptrs in .h file and use them to creating windows. I prefer the way when ptr is defined inside function and later DTOR of object is called by parent.

    Have you ever seen such issue?
    Let me know if you need more detailed code.



  • add newuser->setWindowFlags(newuser->windowFlags() | Qt::Window);



  • It helps, thank you


Log in to reply
 

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