Results 1 to 2 of 2

Thread: Custom push button issue

  1. #1
    Join Date
    Dec 2016
    Posts
    37
    Qt products
    Qt5
    Platforms
    Windows

    Default Custom push button issue

    I've got a custom button subclassed from QPushButton.
    I draw an image in the button followed by some text, using painter.drawRect and painter.drawText.
    Initially the button shows up fine, but when I click on it, the text disappears. The image is still there.
    When I click on it again, the text reappears, the image also still there.

    Not sure why the text disappears. Any ideas?

    Thanks.

    t

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    507
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Ваш форум просто лучше всех!

    Hi, could you show some code?

    Ginsengelf

Similar Threads

  1. Action using Push Button ?
    By steve.bush in forum Newbie
    Replies: 7
    Last Post: 25th February 2016, 15:36
  2. push button
    By arumita in forum Newbie
    Replies: 1
    Last Post: 3rd June 2014, 01:02
  3. QT push button style sheet issue
    By meraj ansari in forum Qt Programming
    Replies: 4
    Last Post: 4th October 2013, 12:56
  4. Custom Push Button Size
    By fruzzo in forum Qt Programming
    Replies: 2
    Last Post: 19th June 2012, 14:23
  5. Push Button with image?
    By steve.bush in forum Newbie
    Replies: 10
    Last Post: 18th March 2011, 06:48

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.