Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. The view of new window appears in area of old window.
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    torrancee
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

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

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      3
      • T Offline
        T Offline
        torrancee
        wrote on last edited by
        #3

        It helps, thank you

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved