Results 1 to 7 of 7

Thread: Qt Creator - Main widow and second window

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Dec 2018
    Posts
    9
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    7

    Default Re: Qt Creator - Main widow and second window

    but sir, is there a way to fix my error?
    My professor wants me to do it that way

    you say that my error is that I don't have a class dialog.
    but don't I have one at secwindow.h line 23??


    Added after 59 minutes:


    I edited the void MainWindow::show();

    Qt Code:
    1. void MainWindow::show()
    2. {
    3. QDialog *dialog = new QDialog(this);
    4. connect(dialog, SIGNAL(accepted()), this, SLOT(show()));
    5. connect(dialog, SIGNAL(rejected()), this, SLOT(show()));
    6. dialog->show();
    7. hide();
    8. };
    To copy to clipboard, switch view to plain text mode 

    there's no error anymore but it just doesn't show my main window.

    it says that:
    QObject::connect: (sender name: 'MainWindow')
    QObject::connect: (receiver name: 'MainWindow')


    It just shows like a blank window first, then when I close that blank window...my main window will appear(in this part, the modal approach still works)
    how can I fix this please?
    Last edited by Kuushie118; 28th December 2018 at 09:47.

Similar Threads

  1. Replies: 2
    Last Post: 8th November 2016, 05:44
  2. Resizeable main window in Qt Creator?
    By Lendrick in forum Qt Tools
    Replies: 2
    Last Post: 3rd June 2009, 20:57
  3. Replies: 11
    Last Post: 11th August 2008, 10:14
  4. Replies: 1
    Last Post: 7th November 2007, 09:39
  5. Replies: 15
    Last Post: 23rd March 2007, 17:16

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.