Results 1 to 3 of 3

Thread: Error in go to slot in qt project

  1. #1
    Join Date
    Feb 2013
    Posts
    71
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Error in go to slot in qt project

    Hi, not sure if its a qt creator or qt designer problem but when I do go to slot on a push button in my form it creates the slot in the ui header file, which is correct, but then it does a strange thing where the constructor for the slot is also placed in the header file. I don't know why this is but ever since now I can't use a pointer to my mainwindow class as it says mainwindow does not name a type. Firstly anyone know anything about why the go to slot function slot appears in the header file not the .cpp like normal?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Error in go to slot in qt project

    What is a "constructor for a slot"?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Error in go to slot in qt project

    In general, I would advise against using the go-to-slot functionality because it uses the auto connection features based on object names and that can easily get out of sync when editing the designer file.

    Cheers,
    _

  4. The following user says thank you to anda_skoa for this useful post:

    Cyrebo (28th April 2013)

Similar Threads

  1. error while running qt project
    By komal1991 in forum Qt Programming
    Replies: 6
    Last Post: 22nd November 2011, 09:28
  2. error while building qt project
    By bibhukalyana in forum Newbie
    Replies: 2
    Last Post: 9th May 2011, 03:19
  3. project built error
    By Mikele di Sagitter in forum Qt Programming
    Replies: 0
    Last Post: 6th January 2011, 14:32
  4. Error Linking QWT-project
    By effendi in forum Qwt
    Replies: 1
    Last Post: 28th October 2008, 06:54
  5. Project Error
    By assismvla in forum Installation and Deployment
    Replies: 6
    Last Post: 18th June 2008, 19:48

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.