Results 1 to 10 of 10

Thread: Creating a Dialog in a Slot of QMainWindow

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Creating a Dialog in a Slot of QMainWindow

    can you attach compilable sources?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Creating a Dialog in a Slot of QMainWindow

    Do you have dialog.cpp in the .pro file? If not, that would explain why you didn't get compilation errors but managed to pass to the linking stage.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    tilm (13th August 2008)

  4. #3
    Join Date
    Aug 2008
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Creating a Dialog in a Slot of QMainWindow

    Thanks jpn, this was the problem. I always thought that

    qmake -project

    was sufficient to create a complete .pro file (I'm sure that I ran it before qmake and make). For me this was the first time that something in a .pro file created with qmake was missing. Do you know the reason for this?
    Last edited by tilm; 13th August 2008 at 17:41. Reason: spelling error

  5. #4
    Join Date
    Aug 2008
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Creating a Dialog in a Slot of QMainWindow

    I think I found the answer on my own: 'qmake -project' only includes dialog.cpp into the .pro file when dialog.h is included in MainWindow.h . But I first included the Dialog header file in MainWindow.cpp. That was the reason.

Similar Threads

  1. Replies: 4
    Last Post: 25th August 2014, 18:05
  2. Problem When Creating my own Slot
    By Fatla in forum Qt Programming
    Replies: 12
    Last Post: 6th June 2008, 14:44
  3. Replies: 3
    Last Post: 18th October 2007, 08:07

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.