Results 1 to 4 of 4

Thread: Derived class from QLineEdit is behaving differently.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Posts
    100
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11
    Thanks
    1

    Default Derived class from QLineEdit is behaving differently.

    hi,

    i have derived a class say MyLineEdit From QLineEdit as below.

    Qt Code:
    1. classs MyLineEdit:public QLineEdit
    2. {
    3.  
    4. setFocusPolicy(Qt::OnClickFocus);
    5. setInputMask("000");
    6. setmaxLength(5);
    7. setStyleSheet("color:white");
    8. }
    9.  
    10.  
    11. myLineEdit *obj1;
    12. obj1 -> setInputMask("NNNNNN");
    13. connect(obj1,SIGNAL(editingFinished()),this,SLOT( printFinish()));
    To copy to clipboard, switch view to plain text mode 
    But, This never comes in a printFinish() Slot.

    If i dont take use, obj1 -> setInputMask("NNNNNN"); , than the things are normal and it invokes printFinish() Slot.

    what is the problem in this.
    Last edited by high_flyer; 20th January 2011 at 09:19. Reason: code tags

Similar Threads

  1. Can not cast into the derived class from QScrollBar
    By learning_qt in forum Qt Programming
    Replies: 2
    Last Post: 19th December 2008, 10:23
  2. no frame on Qlabel derived class
    By tupu_83 in forum Qt Programming
    Replies: 2
    Last Post: 19th November 2008, 16:01
  3. Use QWidget derived class in Dialog
    By qtneuling in forum Qt Tools
    Replies: 2
    Last Post: 17th May 2008, 23:29
  4. rtti() of derived class
    By quickNitin in forum Newbie
    Replies: 4
    Last Post: 8th October 2006, 14:20
  5. Signal/slot looking in base class, not derived class
    By georgie in forum Qt Programming
    Replies: 2
    Last Post: 12th May 2006, 07:36

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.