
Originally Posted by
guilugi
By the way, if you don't set any pixmap in the button, does the string become visible ?
Thanks for your attempt.
I can use either ICON or TEXT. But i need a button which can accomedate ICON & TEXT.
N:B : Here am giving the full code. i am using Q3ToolBar and adding QToolButton to it. see this
MyMainWindow::MyMainWindow()
{
--------
---------
Q3ToolBar *myToolBar = new Q3ToolBar( this );
tr("Quit"), this, SLOT( close() ), myToolBar, "Quit"); //setting pixmap in QToolButton
btn->setText("My Text......"); //setting text in QToolButton
---------
---------
-------
}
MyMainWindow::MyMainWindow()
{
--------
---------
Q3ToolBar *myToolBar = new Q3ToolBar( this );
QToolButton *btn= new QToolButton( QIcon(":Images/imageOne.png"), tr("Quit"),
tr("Quit"), this, SLOT( close() ), myToolBar, "Quit"); //setting pixmap in QToolButton
btn->setText("My Text......"); //setting text in QToolButton
---------
---------
-------
}
To copy to clipboard, switch view to plain text mode
Now can you identify....??
Can i set any property so that i can accomedate both the icon , text. ...????
thank u
Bookmarks