QToolButton alignment issue

the code for the two buttons at the top is:

startButton = new QPushButton(QIcon(":/images/" + iconTheme + "/start.png"), tr("&Start"), this);
startButton->setWhatsThis(tr("Start this virtual machine"));
startButton->setIconSize(QSize(22, 22));

stopButton = new QToolButton(this);
stopButton->setIcon(QIcon(":/images/" + iconTheme + "/stop.png"));
stopButton->setText(tr("&Stop"));
stopButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
stopButton->setWhatsThis(tr("Stop this virtual machine"));
stopButton->setIconSize(QSize(22, 22));
stopButton->setSizePolicy(startButton->sizePolicy());
stopButton->setEnabled(false);

QHBoxLayout *powerButtonsLayout = new QHBoxLayout;
powerButtonsLayout->addWidget(startButton);
powerButtonsLayout->addWidget(stopButton);

Trackback URL for this post:

http://intellilinux.info/trackback/23
AttachmentSize
alignment.png44.1 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Cheap Jordans

Writing blogs is a good habit and wish you to develop it. After reading your blog, I feel very exciting! Thanks for sharing so wonderful article with us. Now, I'm pleased to introduce you to know about a comfortable shoes that makes your life better! Via Cheap Jordans or Cheap Jordan Shoes the website, you can choice what you like. Thank you for your coming!

my solution

rather than trying to figure out why this happens, I finally just broke down and decided not to use a QToolButton.

It means that the button just drops a ment when you click it though, and I wanted it to send poweroff if you click, and give other options if you hold.

oh well...