Results 1 to 5 of 5

Thread: Reference Code over and over again (Solved)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2010
    Location
    South Africa
    Posts
    56
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Reference Code over and over again (Solved)

    Ok i dont know how to best put this but this is what i want to do.

    I would like to write a bunch of connect singnals and insert them into a file aor something of the sort then reference them in my code again.


    For example i have multiple functions that create the following connects

    Qt Code:
    1. connect(this, SIGNAL(setwebview(QString)), child, SLOT(reloadme(QString)));
    2. connect(this, SIGNAL(backpressed()), child, SLOT(backispressed()));
    3. connect(child, SIGNAL(openInvoice(QString,QString)),this, SLOT(openInvoice(QString,QString))); connect(child, SIGNAL(setBackStack(QString)), this, SLOT(setstack(QString)));
    To copy to clipboard, switch view to plain text mode 


    Now lets say i would like to do a change in that code i currently have to change the connects in about 45 places. So what im hoping to di is write the connects someplace once then whenever i need the code i can just refernce the file of sorts

    in coldfusion i would use
    Qt Code:
    1. <cfinclude template="code.cfm">
    To copy to clipboard, switch view to plain text mode 
    Or something of that sort.

    So is it possible.

    Regards
    Last edited by ShapeShiftme; 18th May 2011 at 16:01.

Similar Threads

  1. How get a reference to a QList
    By franco.amato in forum Newbie
    Replies: 4
    Last Post: 20th January 2011, 21:52
  2. Reference to ui
    By Phalanx in forum Qt Programming
    Replies: 7
    Last Post: 22nd April 2010, 15:58
  3. Undefined reference to crt
    By derektaprell in forum Installation and Deployment
    Replies: 0
    Last Post: 20th October 2009, 08:34
  4. Undefined Reference To...
    By ManuMies in forum Qt Programming
    Replies: 6
    Last Post: 10th February 2009, 12:14
  5. Pasting code from code tag in emacs
    By Gopala Krishna in forum General Discussion
    Replies: 0
    Last Post: 16th February 2007, 05:47

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.