Results 1 to 5 of 5

Thread: how to access widgets values?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 47 Times in 43 Posts

    Default Re: how to access widgets values?

    With lineedit.text() I'm getting only the , latest lineedit's value.
    but im using two lineedits.
    how can i access both?

    im using in main because,
    i want to create dynamic line edits frm database
    the folowing code will be replaced..
    where q is the sqlquery with attributes for creating LINE EDIT.

    OLD CODE:
    w->createLineEdit("","NameLineEdit",1,1);

    NEW CODE:
    w->createLineEdit(q.value(1).toString(),q.value(1).t oString(),1,1);

    HOW CAN I ACCESS ALL THE LINEEDITS VALUE?

    bala

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 69 Times in 67 Posts

    Default Re: how to access widgets values?

    Quote Originally Posted by BalaQT View Post
    HOW CAN I ACCESS ALL THE LINEEDITS VALUE?
    Don't shout; it's rude.

    Read something about C++ programming and how to store values and keep references.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: how to access widgets values?

    Quote Originally Posted by BalaQT View Post
    HOW CAN I ACCESS ALL THE LINEEDITS VALUE?
    In class DynamicControls: give every line edit an id, and create a getter function ala return getLineDcit(id)->text();.

Similar Threads

  1. Mac OS X Top-Level Transparent Widgets
    By tinsuke in forum Qt Programming
    Replies: 0
    Last Post: 17th October 2008, 16:01
  2. Upper limit on number of widgets?
    By jdiewald in forum Qt Programming
    Replies: 1
    Last Post: 29th September 2008, 23:00
  3. Access to widgets from a Dialog to another one
    By jean in forum Qt Programming
    Replies: 7
    Last Post: 7th August 2008, 09:42
  4. Replies: 2
    Last Post: 16th May 2008, 14:39
  5. Access widgets
    By Gayathri in forum Newbie
    Replies: 2
    Last Post: 17th November 2006, 14:37

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.