Results 1 to 2 of 2

Thread: How to set data

  1. #1
    Join Date
    Feb 2008
    Posts
    47
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Post How to set data

    hi,
    Actually i have a QLineedit in designer which has 0 initially.When i want to enter data into the QLineedit then this 0 has to be cleared and i should be able to enter data.
    I am able to do it manually.But when i click that control then immediately,it should be cleared off.
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set data

    You can install an event filter to intercept the QFocusEvent and clear the QLineEdit (be sure to check the focus reason).

    See: QObject::installEventFilter()

Similar Threads

  1. QSqlQueryModel data update
    By psi in forum Qt Programming
    Replies: 4
    Last Post: 20th July 2012, 03:59
  2. Replies: 4
    Last Post: 19th October 2007, 19:47
  3. Data model
    By steg90 in forum Qt Programming
    Replies: 3
    Last Post: 17th September 2007, 12:14
  4. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 12:53
  5. How to convert binary data to hexadecimal data
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 8th March 2006, 16: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.