Results 1 to 20 of 32

Thread: How to create custom slot in Qt Designer 4.1?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    New Malden (near London)
    Posts
    32
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: How to create custom slot in Qt Designer 4.1?

    Quote Originally Posted by cioannou
    Unfortunately after going through the Qt 4 docs many times haven't yet managed to add a custom slot.
    The bottom line is, you cannot write slots in Qt 4 Designer. That functionality has been taken out, and the .ui.h file system abolished, in Qt 4. Qt4D does have a signal/slot editor, but that only applies to connecting existing signals to existing slots.

    To use your forms in programs, you need to follow the instructions in the Qt Designer Manual, specifically the section towards the bottom headed "Using Forms and Components".

    To see an example of what the manual calls "The Single Inheritance Approach", you might like to look at the source code to my in-process app, to be found at its Sourceforge CVS repository: http://cvs.sourceforge.net/viewcvs.p...in/catkin-qtm/. You need to look at both catkin.h and catkin.cc, and note the use of the Ui namespace and the object which is used to set up the user-interface of another object. Thus, widgets and other objects coming from Qt Designer are clearly marked in the catkin.cc source code.

    For the direct approach, two examples can be found in the catkin.cc file at the same repository, in the about() and getPreferences() methods.

    Hope this helps.

    Matt Smith

  2. #2
    Join Date
    Jan 2006
    Location
    Athens-Greece
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to create custom slot in Qt Designer 4.1?

    Thanks a lot for the info,

    have already tried all methods mentioned in the docs, but they all failed, so I will check your example.
    If there weren't noobs there would be no experts

Similar Threads

  1. Custom signal in qt designer
    By txandi in forum Qt Tools
    Replies: 1
    Last Post: 4th December 2008, 20:25
  2. create a custom slot, hints?
    By pledians in forum Qt Programming
    Replies: 1
    Last Post: 2nd October 2008, 14:26
  3. How to create Custom Slot upon widgets
    By ashukla in forum Qt Programming
    Replies: 6
    Last Post: 8th September 2007, 14:07
  4. Replies: 2
    Last Post: 12th July 2007, 09:55
  5. custom slot + Designer
    By bashamehboob in forum Qt Tools
    Replies: 1
    Last Post: 28th April 2006, 15:17

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.