Results 1 to 5 of 5

Thread: problem with userdefined slot definition in QT4.4.3

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default problem with userdefined slot definition in QT4.4.3

    Hi,

    1. I created a project(LayoutDesign) in QT4.4.3,it created LayoutDesign.ui ,LayoutDesign.h,LayoutDesign.cpp and main.cpp file
    2. I opened the ui file using QTDesigner and i added 3 widgets(LineEdit1,Pushbutton,LineEdit2) on to it.
    3. my intention is when i click Pushbutton it should take the input from LineEdit1 and make some calculations and displayed in LineEdit2.
    4. Using signal and slot mechanism i connected the widgets in below manner in ui_LayoutDesign.h file

    Qt Code:
    1. QObject::connect(PushButton, SIGNAL(clicked()), LayoutDesign, SLOT(Convert()));
    2. QObject::connect(LineEdit1, SIGNAL(activated(int)), LayoutDesign, SLOT(Convert()));
    3. QObject::connect(LineEdit2, SIGNAL(activated(int)), LayoutDesign, SLOT(Convert()));
    To copy to clipboard, switch view to plain text mode 

    The Convert() slot specified in the connect function is newly added slot(it means it is not predefined).

    Here My question is where to define the Convert() slot in my code.
    Last edited by jpn; 31st December 2008 at 08:12. Reason: missing [code] tags

Similar Threads

  1. Problem When Creating my own Slot
    By Fatla in forum Qt Programming
    Replies: 12
    Last Post: 6th June 2008, 14:44

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
  •  
Qt is a trademark of The Qt Company.