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. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qt Creator - Main widow and second window

    Quote Originally Posted by Kuushie118 View Post
    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??
    Actually, yes you do have a declaration of Dialog at that location. I misread the error message. While you do have a Dialog class, you do not have a Dialog class constructor that accepts an argument. Your code:
    Qt Code:
    1. Dialog *dialog = new Dialog(this); //ERROR: no matching constructor for initialization of 'Dialog'
    To copy to clipboard, switch view to plain text mode 
    is passing an argument and this does not match any constructor you have declared:
    Qt Code:
    1. class Dialog : public QDialog
    2. {
    3. public:
    4. Dialog(); // <<<< no arguments accepted
    5. ...
    To copy to clipboard, switch view to plain text mode 
    Your Dialog constructor should have a similar declaration and implementation to the one you have for SecWindow.

  2. The following user says thank you to ChrisW67 for this useful post:

    Kuushie118 (30th December 2018)

Similar Threads

  1. Replies: 2
    Last Post: 8th November 2016, 04:44
  2. Resizeable main window in Qt Creator?
    By Lendrick in forum Qt Tools
    Replies: 2
    Last Post: 3rd June 2009, 19:57
  3. Replies: 11
    Last Post: 11th August 2008, 09:14
  4. Replies: 1
    Last Post: 7th November 2007, 08:39
  5. Replies: 15
    Last Post: 23rd March 2007, 16: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.