Results 1 to 1 of 1

Thread: QML / widget - white background ??

  1. #1
    Join Date
    May 2011
    Posts
    132
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QML / widget - white background ??

    Some reason only mac showing white background for qml. The screenshots is showing the issue, I want of course the base gui bg color.

    I tried set the color to yellow to see if that have some effect, no difference. if would I could apply bg from c++ by contextProperty but does not work.

    Qt Code:
    1. Rectangle {
    2. color: "yellow"
    To copy to clipboard, switch view to plain text mode 

    Why there is white bg ??shot2.png

    This is how I add the qml
    Qt Code:
    1. QDeclarativeView *qmlSearchField = new QDeclarativeView;
    2. qmlSearchField->rootContext()->setContextProperty("qmlmainview",_mainView);
    3. qmlSearchField->setSource(QUrl("qrc:/qml/SearchField.qml"));
    To copy to clipboard, switch view to plain text mode 


    Added after 39 minutes:


    FIX:
    Qt Code:
    1. qmlSearchField->setStyleSheet("background-color: transparent;");
    To copy to clipboard, switch view to plain text mode 

    but anyway, bizare
    Last edited by migel; 5th July 2011 at 18:48.

Similar Threads

  1. QPushButton: Outline white text in black on transparent background
    By Tito in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 20th July 2011, 08:16
  2. QwtLegend background in a Tab Widget
    By AnnaP in forum Qwt
    Replies: 1
    Last Post: 7th February 2011, 13:21
  3. How to set a widget as background?
    By Patrick Sorcery in forum Qt Programming
    Replies: 7
    Last Post: 25th October 2010, 12:41
  4. White background in window, getting desperate!
    By dictoon in forum Qt Programming
    Replies: 19
    Last Post: 31st December 2009, 09:35
  5. Qwt overrides Widget background
    By garfield in forum Qwt
    Replies: 1
    Last Post: 18th December 2007, 09:16

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.