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. MDI Custom Class Dialog not Real Close()

MDI Custom Class Dialog not Real Close()

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.1k Views 1 Watching
  • 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.
  • E Offline
    E Offline
    esbxp
    wrote on last edited by
    #1

    Hola:
    hola, este es mi codigo para un Custom Dialog, que es desplegado en una MDI Area, en los botones Okey y Close estan conectados a los Slot Accept() y Reject(), los que no producen un Real Cierre(), solo ocultan los controles, cual puede ser el problema?

    Sorry my english,,,
    hello , this is my code for Custom Dialog, this is display in a MDI area,  in the button Okey or Close, connect a Slot Accept()  and  Reject(), this not produce a Real Close(), only hide the controls.
    

    Dialog is a Custom Class(), and function normal, wend no parent the mdi area, !!!
    what is a problem !!!

    @
    dlgFondos *dlg = new dlgFondos();
    dlg.setAttribute(Qt::WA_DeleteOnClose);
    this->ui->mdiArea->addSubWindow(dlg);
    dlg->open();
    @

    please view the images 1, and 2

    [url=http://postimage.org/][img=http://s19.postimage.org/uu398n8ib/mdi_Dialog_Image1.png][/url]

    despues de presionar Okey o Cancel
    later press a button okey or cancel

    [url=http://postimage.org/][img=http://s19.postimage.org/rlyrvlm8j/mdi_Dialog_Image2.png][/url]

    1 Reply Last reply
    0
    • L Offline
      L Offline
      luca
      wrote on last edited by
      #2

      @
      my_widget->setAttribute(Qt::WA_DeleteOnClose);
      QMdiSubWindow *mdisw;
      mdisw = new QMdiSubWindow(ui->mdiArea);
      mdisw->setWidget(my_widget);
      connect(my_widget, SIGNAL(destroyed()), mdisw, SLOT(deleteLater()));
      mdisw->setAttribute( Qt::WA_DeleteOnClose );
      ui->mdiArea->addSubWindow(mdisw);
      @

      1 Reply Last reply
      0
      • E Offline
        E Offline
        esbxp
        wrote on last edited by
        #3

        WOW ...... Very good, !!!!
        Thanks !!!!

        1 Reply Last reply
        0
        • L Offline
          L Offline
          luca
          wrote on last edited by
          #4

          ;-)

          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