I am developing a simple GUI application using Qt 4.5 (on a windows PC).
I wanted to make a cute push button using my own icons.
I tried using the QPushButton class and a simple image as a pixmap. I could always see a rectangular outline around the icon, whenever it was clicked.
How to do away with that.
I also created a QIcon object with two icons (*.png files) one for the state: "Normal" and the other for the state: "Selected". (Refer the attachments).
But couldnt get the clue on how to link the push button states to these icons.
So, now my questions are:
1. How to use image files like *.png, to create a custom push button (without getting the rectangular outline)
2. Is it always a must to use QPushButton class for this, OR do we have an alternative for realizing the above?
- Sudhakaran
Bookmarks