Results 1 to 4 of 4

Thread: Widget: Go To Slot causes : The class definition of 'Ui:: could not be found

  1. #1
    Join Date
    May 2009
    Location
    Vienna
    Posts
    91
    Thanks
    18
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Widget: Go To Slot causes : The class definition of 'Ui:: could not be found

    Hello,

    I want to make a custom widget.
    So i've created in the Designer a new widget and placed several radiobuttons, spinboxes,etc...
    When i make a right click and select from the context menu: Go To Slot, the message comes:
    The class definition of 'Ui::Mywidget could not be found
    But the desinger had already created the *.h and *.cpp Files..???

    Any ideas or hints?

    thanks in advance,
    Astronomy

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,734
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Widget: Go To Slot causes : The class definition of 'Ui:: could not be found

    Have you included the "ui_*.h" file in the file that the slot would be created in?

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

    neutrin0b (30th April 2013)

  4. #3
    Join Date
    May 2009
    Location
    Vienna
    Posts
    91
    Thanks
    18
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Widget: Go To Slot causes : The class definition of 'Ui:: could not be found

    Hi, i guess yes. In the *.cpp file..
    Qt Code:
    1. #include "jobitem.h"
    2. #include "ui_jobitem.h"
    To copy to clipboard, switch view to plain text mode 
    This was done automatically by the designer. Normally when i create a new dialog, adding a slot is simply done by a right click of the context menu. Now, i tried the first time to create a own widget, maybe i forgot something basic in the setup?

    regards Astronomy

    PS: i did: Add new: QT-Designer Form Class (creates a designer form*. ui with a matching class) and then i'd chosen from template "widget"..
    i guess it is simple as that?
    Last edited by Astronomy; 8th August 2010 at 10:48.

  5. #4
    Join Date
    May 2009
    Location
    Vienna
    Posts
    91
    Thanks
    18
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Widget: Go To Slot causes : The class definition of 'Ui:: could not be found

    Ohh..

    it was simpe as that.. i just tried a new *ui class, with a new widget for testing and its working..
    i guess the designer had some error during creating the first files..

    with the new one i'ts working... so i delete the old files

    greetz Astronomy

Similar Threads

  1. Replies: 4
    Last Post: 2nd January 2009, 06:27
  2. Replies: 12
    Last Post: 18th September 2008, 15:04
  3. Replies: 3
    Last Post: 19th February 2008, 13:10
  4. Omitting private part of a class definition
    By Raistlin in forum General Programming
    Replies: 2
    Last Post: 23rd March 2007, 11:51
  5. Signal/slot looking in base class, not derived class
    By georgie in forum Qt Programming
    Replies: 2
    Last Post: 12th May 2006, 07:36

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.