Results 1 to 2 of 2

Thread: How to reset QPushButton's border-image through setStyleSheet?

  1. #1
    Join Date
    Oct 2012
    Posts
    35
    Thanks
    26
    Qt products
    Qt4
    Platforms
    Windows

    Default How to reset QPushButton's border-image through setStyleSheet?

    Hi All,

    at first ,i use setStyleSheet set button's border-image, now i want to clear and change the original border-image. so i use ‘ btn->setStyleSheet("QPushButton{border-image:url(:/images/backgound.png)}"’ , but original border-image have exited already.

    and i tried used the below code, it cann't change alse.

    btn->setStyleSheet("")};
    btn->setStyleSheet("QPushButton{border-image:url(:/images/backgound.png)};

    or
    btn->setStyleSheet(NULL)};
    btn->setStyleSheet("QPushButton{border-image:url(:/images/backgound.png)};


    please give me any advice!

    thanks.

    ken

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to reset QPushButton's border-image through setStyleSheet?

    What is an "original border-image"? And what does it mean that it "exited"?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 3
    Last Post: 4th May 2011, 14:29
  2. Replies: 2
    Last Post: 25th November 2010, 09:43
  3. Replies: 1
    Last Post: 9th February 2010, 12:11
  4. How to set border for QPushButton?
    By DiamonDogX in forum Qt Programming
    Replies: 7
    Last Post: 5th August 2009, 16:53
  5. Replies: 3
    Last Post: 28th January 2007, 17:24

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.