Results 1 to 4 of 4

Thread: How can I put a button onto the qLabel?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: How can I put a button onto the qLabel?

    Create the button as child of the label:
    Qt Code:
    1. QPushButton* button = new QPushButton("Title", label);
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  2. The following user says thank you to jpn for this useful post:

    dwlnet (5th September 2007)

  3. #2
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    76
    Thanked 37 Times in 32 Posts

    Default Re: How can I put a button onto the qLabel?

    I think you can use style sheets also for this. The following link expalin how to put a button inside linedit. I think you can do the same for label

    http://labs.trolltech.com/blogs/2007...-clear-button/
    We can't solve problems by using the same kind of thinking we used when we created them

  4. The following user says thank you to sunil.thaha for this useful post:

    dwlnet (5th September 2007)

Similar Threads

  1. Disable Checkable Button Question
    By jbpvr in forum Qt Programming
    Replies: 9
    Last Post: 20th March 2007, 17:57
  2. Mouse Over event on button
    By vishal.chauhan in forum Qt Programming
    Replies: 9
    Last Post: 10th January 2007, 05:03
  3. QScrollArea display custom QLabel
    By spawnwj in forum Qt Programming
    Replies: 6
    Last Post: 6th December 2006, 03:38
  4. Push button double click
    By curtisw in forum Qt Programming
    Replies: 3
    Last Post: 15th February 2006, 16:40
  5. QLabel on a Button
    By cwalsh in forum Newbie
    Replies: 4
    Last Post: 12th January 2006, 16:06

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.