Results 1 to 9 of 9

Thread: Connecting signal to button

  1. #1
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Connecting signal to button

    Hi,

    I've got this strange warning on one of my ui forms :

    'Warning : The project doesn't contain any class which uses this form!'

    Very strange as it does, anybody had this error before?

    All I am trying to do is connect a signal to a QPushButton!

    Regards,
    Steve

  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: Connecting signal to button

    When do you get the error and how does your project file look like?

  3. #3
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Connecting signal to button

    I get the error when I double click on my QPushButton on the form.

    Project file is built within Visual Studio.net. I've never had this problem before?

  4. #4
    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: Connecting signal to button

    You mean you get the warning while the application is running? Without seeing the .pro file we won't be able to help much.

  5. #5
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Connecting signal to button

    I get the warning while I'm editing the form in visual studio.net.

  6. #6
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Connecting signal to button

    Is it really an error ?? You say "Warning ...."

    by the warning u must not be using the form anywhere... it is just defined,,,but not used...
    am i right ??

  7. #7
    Join Date
    Jul 2007
    Posts
    14
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Question A strange message: The project doesn't contain any class which uses this form!

    Hello.
    I work with QT 4.2 and Visual Studio 2005. Now there is a strange situation. I try to connect a signal to an element of a form and see the message: 'Warning. The project doesn't contain any class which uses this form!' (in attachment)
    There was the same guestion some weeks ago... but without answer unfortunately
    http://www.qtcentre.org/forum/f-qt-p...ton-10491.html
    Sometimes the message disappears but more often I see it again when I'm trying to connect a signal. Hitherto I couldn't find any logic in its behaviour....
    Attached Images Attached Images
    Last edited by jpn; 13th December 2007 at 09:18. Reason: threads merged

  8. #8
    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: Connecting signal to button

    Quote Originally Posted by steg90 View Post
    I've got this strange warning on one of my ui forms :

    'Warning : The project doesn't contain any class which uses this form!'

    Very strange as it does, anybody had this error before?

    All I am trying to do is connect a signal to a QPushButton!
    Quote Originally Posted by steg90 View Post
    I get the error when I double click on my QPushButton on the form.
    Hmm, you don't connect signals by double clicking. When you double click a child widget of a form the integration attempts to insert a slot stub with naming convention of automatic connections. Now, if there is no relevant class, or the integration is unable to detect where the form is being used, such error makes sense.
    J-P Nurmi

  9. #9
    Join Date
    Jul 2007
    Posts
    14
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Connecting signal to button

    I get the error when I double click on my QPushButton on the form.
    Most likely the message appeared not only in case of double clicking. I got it when I tried to use functionality 'Connecting Signals & Slots'. It seems to me I found the reason of the mistake in my case. A namespace was used there.... in such way
    Qt Code:
    1. namespace Space
    2. {
    3. class TNewDlg : public QWidget
    4. {
    5.  
    6. private:
    7. Ui::TNewDlgClass ui;
    8. ..........
    To copy to clipboard, switch view to plain text mode 
    Probably that's why the integration couldn't find relevant class.... I refused from using namespace and it works correctly now (at least I hope so )

Similar Threads

  1. Connecting to a base class signal?
    By AaronMK in forum Qt Programming
    Replies: 4
    Last Post: 26th October 2007, 22:37
  2. Connecting signal to form that is closing
    By steg90 in forum Qt Programming
    Replies: 3
    Last Post: 18th May 2007, 07:54
  3. Replies: 2
    Last Post: 17th May 2006, 21:01
  4. Push button double click
    By curtisw in forum Qt Programming
    Replies: 3
    Last Post: 15th February 2006, 16:40

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.