Results 1 to 5 of 5

Thread: Creator: How do I tidy up after deleting a qspinbox from a form

  1. #1
    Join Date
    Feb 2015
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Creator: How do I tidy up after deleting a qspinbox from a form

    I've used Creator to build my GUI. In order to act on the user changing values in spinboxes, I right click on the spinbox, select "go to slot" and select "on value changed". This gives me a member function in the main window class that gets called when the user changes the value. Very successful. Does exactly what I want. However, I changed my mind about some of the spinboxes and wanted to delete them. I clicked on the spinbox in the form editor and hit delete. Everything still compiles and runs OK but I can't tidy up. I now get runtime QMetaObject::connectSlotsByName: No matching signal for on_spinBox_25_valueChanged(int) errors. OK they're non-fatal but annoying. Also I get compile time errors if I delete the member function from the main window class. Can anyone help with some pointers on how to tidy up after deleting a spinbox from a form.
    Last edited by timlyes; 7th February 2015 at 11:41.

  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: Creator: How do I tidy up after deleting a qspinbox from a form

    Delete or rename the slots matching the connect-by-name scheme.
    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
    Feb 2015
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Creator: How do I tidy up after deleting a qspinbox from a form

    Thanks. That was enough of a pointer to help me find out what to do. All OK now.

  4. #4
    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: Creator: How do I tidy up after deleting a qspinbox from a form

    And another good example why the connect by name "feature" does more good than harm.

    One never has to worry about things like that with propery explicit connects.

    Cheers,
    _

  5. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Creator: How do I tidy up after deleting a qspinbox from a form

    And another good example why the connect by name "feature" does more good than harm.
    Agreed. Basic UI layout goes into the .ui files, advanced ui and program logic goes in the C++ files. You might end up with a lot more code, but it's right there in front of you, not implicit with some MOC magic.

Similar Threads

  1. Replies: 1
    Last Post: 5th May 2014, 08:10
  2. Replies: 3
    Last Post: 18th July 2013, 04:12
  3. Replies: 7
    Last Post: 23rd May 2012, 12:00
  4. Replies: 2
    Last Post: 15th February 2012, 23:27
  5. Replies: 1
    Last Post: 28th July 2006, 14:10

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.