Results 1 to 2 of 2

Thread: Trouble resizing QDockWidget buttons with style sheet

  1. #1
    Join Date
    Sep 2010
    Location
    Ontario Canada
    Posts
    23
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Symbian S60 Maemo/MeeGo

    Question Trouble resizing QDockWidget buttons with style sheet

    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://doc.qt.io/qt-4.8/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:
    Qt Code:
    1. viewer->setStyleSheet("QDockWidget::close-button, QDockWidget::float-button {background: white; padding: 0px; icon-size: 30px; width: 20px; height: 20px;}"
    2. "QMainWindow::separator {width: 16px;}");
    To copy to clipboard, switch view to plain text mode 
    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

  2. #2
    Join Date
    Sep 2010
    Location
    Ontario Canada
    Posts
    23
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Symbian S60 Maemo/MeeGo

    Default Re: Trouble resizing QDockWidget buttons with style sheet

    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

Similar Threads

  1. Style Sheet Question
    By zgulser in forum Newbie
    Replies: 2
    Last Post: 9th May 2012, 07:22
  2. Problems with Gradient style used through Style sheet on ARM platform
    By puneet.narsapur in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 25th January 2010, 12:48
  3. QToolButton and Style sheet
    By desch in forum Qt Programming
    Replies: 8
    Last Post: 1st December 2007, 08:38
  4. Qt 4.3 Style sheet, new features
    By Angelo Moriconi in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2007, 15:22
  5. How to use style sheet
    By safknw in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2006, 13:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.