Results 1 to 8 of 8

Thread: Pushbutton slot is in header not cpp

Threaded View

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

    Default Pushbutton slot is in header not cpp

    All of a sudden when I add a button and do go to slot, the declaration and function for the slot is added in the .h header file and the function is not called. I have several ui forms where the slot is declared in .h and function for the slot is created in the cpp.

    I've tried renaming the button, deleted and created a new one but it still creates the function in the header file alone. Manually writing the slot in the cpp doesn't work either, the program doesn't even compile it, it just closes when I click the button.

    Thanks in advance for the help

    EDIT: Manually writing the function in .cpp does work but I would still like to know why qt creates the function in .h header rather than .cpp source code.
    Last edited by Cyrebo; 27th April 2013 at 12:46.

Similar Threads

  1. Generated UI header incorrectly includes class header?
    By droneone in forum Qt Programming
    Replies: 7
    Last Post: 14th June 2012, 14:48
  2. Replies: 3
    Last Post: 29th April 2011, 08:54
  3. Replies: 18
    Last Post: 25th January 2010, 11:23
  4. QStandardItem's header item and header label
    By feverzsj in forum Newbie
    Replies: 1
    Last Post: 14th January 2010, 19:57
  5. How to customize horizontal header (diagonal header view)
    By vairamuthu.g in forum Qt Programming
    Replies: 4
    Last Post: 4th September 2008, 15:59

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.