Hi, I've been googling for hours and couldn't find any answer to my question. Nothing apparent on documentation either.
First, I'm developing with the latest Qt, for my N8. I'm trying to create a softkey with the image center aligned. I've tried a lot of things (including style sheets, but I don't know if I did it properly). The code I used is (inside QWidget constructor):
Now, the button in the left side of the standard Exit button get's displayed with the image I selected. I don't need any text, just the image. But it seems impossible to make it in the center position, or better, justified. I can modify the image to make it look like in the center, but that won't work as it will look correctly on my device only.Code:QPixmap icon(":/images/myImg"); QAction *optionsAction = new QAction(QString::null, this); optionsAction->setText(QString::null); optionsAction->setIconText(QString::null); optionsAction->setIcon(icon); optionsAction->setIconText(QString::null); optionsAction->setMenuRole(QAction::ApplicationSpecificRole); optionsAction->setSoftKeyRole(QAction::PositiveSoftKey); addAction(optionsAction);
What is the correct way to do this?
Any help is appreciated.
Kind Regards,
Fábio



