Results 1 to 7 of 7

Thread: Edit Text of a QPushButton with mouse right click

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Edit Text of a QPushButton with mouse right click

    Thanks for your replys. I want the user to change the text. I already handled the right click signal, but I don't know what to do with the "text input box"...

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Edit Text of a QPushButton with mouse right click

    With the text input box you ask for the new text.
    When the user clicks ok, you set button text to the new text.

  3. #3
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Edit Text of a QPushButton with mouse right click

    Ah k. Didn't think about a pop up. This can do the job. I was thinking about editing the text directly like it is done in a edit box, but maybe it is not necessary...

    Thanks.

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Edit Text of a QPushButton with mouse right click

    You can show a line edit above the button, but I don't find this elegant.

Similar Threads

  1. QTableView line edit clears the text on edit
    By PlasticJesus in forum Qt Programming
    Replies: 5
    Last Post: 14th March 2015, 19:06
  2. Replies: 3
    Last Post: 26th August 2010, 08:57
  3. Replies: 7
    Last Post: 26th August 2009, 07:21
  4. Character encoding in text edit and llne edit
    By greenvirag in forum Qt Programming
    Replies: 3
    Last Post: 20th January 2009, 08:45
  5. Replies: 8
    Last Post: 15th May 2007, 09:21

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.