PDA

View Full Version : Trouble resizing QDockWidget buttons with style sheet



Jon Heron
29th July 2012, 15:56
Hello,
I am making a Qt Widget based Ui for use on a tablet (playbook) so touch interaction is needed.
Using Qt 4.8.2.
The dockWidget buttons are too small to be used with touch as is so I am trying to make them larger as per the examples http://qt-project.org/doc/qt-4.8/stylesheet-examples.html#customizing-qdockwidget but I am not having much luck. After applying the style the buttons appear smaller and the frames disapear?
I am applying the style code from main.cpp as follows:

viewer->setStyleSheet("QDockWidget::close-button, QDockWidget::float-button {background: white; padding: 0px; icon-size: 30px; width: 20px; height: 20px;}"
"QMainWindow::separator {width: 16px;}");
Any advice here would be greatly appreciated, I have been playing around with this for hours with no joy. I can move the buttons position and change their colour but nothing I do makes them bigger.
Cheers,
Jon

Jon Heron
1st August 2012, 02:41
Hmmm... Seems I am alone as I see no referance to this problem anywhere else either....
Perhaps its a problem with the playbook armv7le port...
I also noticed that when I float the docWIdget that my float and close buttons disapear and I can no longer move it nor close or doc it after...
It may be time to log a bug...
Cheers,
Jon