×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    4

    QT TextBox after pressed a button

    Hi,

    I'm new in qt development and i need help for my project.

    I have to create a button that when i pressed it, the button changes to a textbox and i can modify the text on it.

    Can anyone tell me how i can do this ?

    Regards,
    JM30

  2. #2
    Registered User
    Join Date
    Mar 2009
    Posts
    118

    Re: QT TextBox after pressed a button

    you can create a dialog with a testbox, and when you press the button, you can use SIGNAL and SLOT to show the dialog.

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QT TextBox after pressed a button

    There are definitely infinite number of possibilities for UI design here. But you can have, for example, QLineEdit and QPushButton and call hilde()/show() on them, so the only one widget is visible at any given time.
    Last edited by divanov; 2010-03-25 at 10:57.

  4. #4
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: QT TextBox after pressed a button

    Yeah, the simplest approach is to lay the button and text box on top of one another (put them in a fixed-size QWidget to keep from upsetting the layout manager, if you're using one), then use hide/show to select which one is visible and active.

Similar Threads

  1. Qt for Symbian development resources
    By liuxg in forum [Archived] Qt General ( Qt技术)
    Replies: 55
    Last Post: 2011-01-26, 04:06
  2. gsreamer-0.10-plugins-good+Phonon
    By niqt in forum Nokia N9
    Replies: 10
    Last Post: 2010-03-05, 09:56
  3. Keep button pressed (like toggle buttons)
    By pixsta in forum Symbian User Interface
    Replies: 4
    Last Post: 2010-02-16, 06:28
  4. kinetic scrolling
    By stalep in forum Nokia N9
    Replies: 10
    Last Post: 2009-12-08, 12:41
  5. Command Button on TextBox Issue in 6230i/3510i
    By manasmchex in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 3
    Last Post: 2006-02-03, 17:13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×