Results 1 to 20 of 58

Thread: Socket Prog

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #24
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: Socket Prog

    The "wasting resources" refers to code like this
    Qt Code:
    1. te1=new QTextEdit;
    2. te1=ui->textEdit;
    To copy to clipboard, switch view to plain text mode 

    Here you create a QTextEdit and immediately lose its pointer by assigning another text edit's pointer to the variable.

    Just
    Qt Code:
    1. te1=ui->textEdit;
    To copy to clipboard, switch view to plain text mode 
    or replace all usages of
    Qt Code:
    1. te1->
    To copy to clipboard, switch view to plain text mode 
    with
    Qt Code:
    1. ui->textEdit->
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    Vivek1982 (19th November 2013)

Similar Threads

  1. client/server prog using UDP
    By rajeshakula in forum Newbie
    Replies: 1
    Last Post: 12th July 2011, 11:43
  2. Build issues when qextsrialport.h is included in Linux prog
    By pupqt in forum Installation and Deployment
    Replies: 1
    Last Post: 7th April 2011, 15:48
  3. Replies: 2
    Last Post: 11th March 2010, 09:46
  4. can the image be displayed as it is in chips prog..
    By sh123 in forum Qt Programming
    Replies: 11
    Last Post: 7th February 2009, 08:15
  5. Qt Prog skip the file reading block
    By dgg32 in forum Qt Programming
    Replies: 10
    Last Post: 10th December 2008, 18:12

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.