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. Qt Desginer Widgets do not show up in a new window.

Qt Desginer Widgets do not show up in a new window.

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 266 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.
  • Q Offline
    Q Offline
    qtnoob420
    wrote on last edited by qtnoob420
    #1

    So basically i want to make 2 step confirmation when deleting something. For that the user presses the "delete" Button, which opens up a new window. here is the actual Delete-Button which deletes the information from the database and a cancel button.
    i already followed this guide: https://www.youtube.com/watch?v=tP70B-pdTH0
    this video shows pretty much what i imagined but when the new window opens, it is just an empty space. My buttons and labels are missing.

    my dialog.h which opens the new window is implemented in the mainwindow.cpp like..

    #include <dialog.h>
    ...
    void MainWindow::on_pushButton_delete_window_clicked()
    {
    QDialog dialog;
    dialog.setModal(true);
    dialog.exec();
    }

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You are creating a QDialog instance so it's normal that it's "empty".

      Based on your header you seem to have a class named Dialog.

      That's one of the reason it's important to properly name your classes, so you do not make that kind of mistake and you also know what the class is for.

      That said, QMessageBox::question might be enough for your purpose.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      Q 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        You are creating a QDialog instance so it's normal that it's "empty".

        Based on your header you seem to have a class named Dialog.

        That's one of the reason it's important to properly name your classes, so you do not make that kind of mistake and you also know what the class is for.

        That said, QMessageBox::question might be enough for your purpose.

        Q Offline
        Q Offline
        qtnoob420
        wrote on last edited by
        #3

        @SGaist thanks. i will look into the QMessageBox::question first then

        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