Results 1 to 2 of 2

Thread: QCheckBox styling problem on Windows Mobile

  1. #1
    Join Date
    Dec 2009
    Posts
    62
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default QCheckBox styling problem on Windows Mobile

    Hi

    I have a QTreeView that is checkable so there are checkboxes to the left. My background is black so I need the checkboxes to be of another color to be visible (non black).

    On Win32 everything looks great. The background is black and the checkboxes in the tree are white.

    However the same code executed on Windows Mobile, the checkboxes have black background with black borders so they are not visible until I select an element in the tree and the selection color makes the black checkbox visible.

    I tried to use a stylesheet but that did not make a difference, please see below. Any ideas on how to handle this problem?


    QTreeView {
    background-color: black;
    color: white;
    }

    QTreeView::item:selected{
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc);
    }

    QCheckBox {
    border-color: white;
    background-color:white;
    color:white;
    }

    QLineEdit {
    padding: 1px;
    border-style: solid;
    border: 2px solid gray;
    border-radius: 8px;
    color: black;
    }


    QMainWindow{
    background-color: black;
    color: white;
    }

  2. #2
    Join Date
    Dec 2009
    Posts
    62
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QCheckBox styling problem on Windows Mobile

    I found some info in QStyledItemDelegate that checkboxes are styled according to the current style. Maybe that is the key, I still do not know how to make the checkbox white in Windows Mobile though.

Similar Threads

  1. Can not run QT App on Windows Mobile
    By zyclop in forum Newbie
    Replies: 1
    Last Post: 22nd April 2010, 09:26
  2. How to Run Sqlite in Windows Mobile
    By Comptrol in forum Qt Programming
    Replies: 0
    Last Post: 26th June 2009, 12:19
  3. Windows Mobile Query
    By tntcoda in forum Qt Programming
    Replies: 1
    Last Post: 8th April 2009, 15:06
  4. QSystemTrayIcon on Windows Mobile 5
    By lovelypp in forum Qt Programming
    Replies: 0
    Last Post: 12th July 2008, 15:57
  5. Windows mobile 6 deployment
    By Gilles.Bordas in forum Installation and Deployment
    Replies: 4
    Last Post: 7th July 2008, 11:06

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.