Results 1 to 2 of 2

Thread: Style sheet working well on all platfors except Android

  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

    Default Style sheet working well on all platfors except Android

    G'Day!
    I have an old widget app that I want to port over to Android but the stylesheet is giving me trouble.
    I have a custom style sheet that I used to make the app look good and be usable on my Blackberry. It works great on my BB10 and on my linux desktop (fedora 21 Gnome3) but on my droid 4.3 device the styled spin boxes and tab widget don't appear.
    Here is my stylesheet code. I put it in the style sheet area for the QTabQidget in the UI editor on creator (Qt5.4).
    Qt Code:
    1. height:6ex;
    2. }
    3. QDoubleSpinBox::up-button {
    4. width: 6ex;
    5. background-color: "light grey";
    6. image: url(:/prefix1/images/upArrow.svg);
    7. }
    8. QDoubleSpinBox::down-button {
    9. width: 6ex;
    10. background-color: "light grey";
    11. image: url(:/prefix1/images/downArrow.svg);
    12. }
    13.  
    14. border-width: 5px;
    15. padding:6px
    16. }
    17. QTabBar QToolButton::right-arrow {
    18. image: url(:/prefix1/images/rightArrowG.svg);
    19. background-color: "light gray";
    20. }
    21.  
    22. QTabBar QToolButton::left-arrow {
    23. image: url(:/prefix1/images/leftArrowG.svg);
    24. background-color: "light gray";
    25. }
    26. QTabBar::tab{
    27. height: 6ex;
    28. border: 2px solid #C4C4C3;
    29. border-bottom-color: #C2C7CB; /* same as the pane color */
    30. border-top-left-radius: 4px;
    31. border-top-right-radius: 4px;
    32. min-width: 8ex;
    33. padding: 2px;
    34. }
    35. QTabBar::scroller{
    36. width: 7ex;
    37. border-width: 6ex;
    38. }
    39. QTabBar::tab:selected, QTabBar::tab:hover {
    40. background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
    41. stop: 0 #fafafa, stop: 0.4 #f4f4f4,
    42. stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);
    43. }
    44.  
    45. QTabBar::tab:selected {
    46. border-color: #9B9B9B;
    47. border-bottom-color: #C2C7CB; /* same as pane color */
    48. }
    To copy to clipboard, switch view to plain text mode 
    Can anybody see where I may be going wrong there?
    I thought at first it was a problem with the svg's loading but even if I dont load the custom images it behaves the same way...
    I am thinking this may be a bug rather than my incompetence...
    Any insight or advice would be appreciated!
    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: Style sheet working well on all platfors except Android


Similar Threads

  1. Replies: 2
    Last Post: 10th September 2012, 09:38
  2. QStyledItemDelegate - style sheet not working
    By tomixer in forum Qt Programming
    Replies: 5
    Last Post: 11th November 2010, 11:12
  3. 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, 13:48
  4. QToolButton and Style sheet
    By desch in forum Qt Programming
    Replies: 8
    Last Post: 1st December 2007, 09:38
  5. How to use style sheet
    By safknw in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2006, 14: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.