×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    86

    Exclamation CheckBox, Ratio buttons, TextBox are not shown correctly in QWebView

    Dear all,

    I have a QWebView which render a webpage with Forms, radio button and checkbox. I set the setAutoFillBackground as true and I use white as the background.

    However, when the webpage is rendered, the text in the TextBox of the form is shown as white, the square box of the checkbox and the round circle of the radio button are also in white.

    In this case, those item are only visiable when there is a backgound contains no white. Anyone knows how to solve this problem??

    Something more to mention: I find it works with the webpage that has background color(not white) or background image.

    About the textbox of the form, even when the background color of the webview is white, the background of the textbox is black and the text is in white by default, which is visiable in this case. But it is not the case on N97(5th edition), everything is white and text in the textbox is not visiable.

    When i change the background color of the webview to Black, everything works. so wired...


    Thanks,
    Zhengtao
    Last edited by Zhengtao; 2009-10-16 at 14:06. Reason: works different on different pones

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Smile Re: CheckBox, Ratio buttons, TextBox are not shown correctly in QWebView

    You can use below line in your code example definitely it will work..

    Code:
    win->setStyleSheet("* { background-color:rgb(150,147,88); padding: 7px ; color:rgb(255,255,255)}");
    I hope it will help..

  3. #3
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    86

    Re: CheckBox, Ratio buttons, TextBox are not shown correctly in QWebView

    Hi Rahulvala,

    I believe your solution changes the background color and it works.

    However, the point is why it is not working with the white background? And Form with Textbox works on N95, N78(3rd edition), but not on N97(5th edition). And the checkbox and radio button do not work on those phone with the white background. Is that a bug of the webkit??

    Regards,
    Zhengtao

  4. #4
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: CheckBox, Ratio buttons, TextBox are not shown correctly in QWebView

    Quote Originally Posted by Zhengtao View Post
    Hi Rahulvala,

    I believe your solution changes the background color and it works.

    However, the point is why it is not working with the white background? And Form with Textbox works on N95, N78(3rd edition), but not on N97(5th edition). And the checkbox and radio button do not work on those phone with the white background. Is that a bug of the webkit??

    Regards,
    Zhengtao
    May be you are right it is bug...
    But you understand that we can change colour of background.

    However I recomand you to first read this below two document and then change your code.

    Qwebview document

    How to use Qwebview

    By reading above two document you will get your solution.

  5. #5
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: CheckBox, Ratio buttons, TextBox are not shown correctly in QWebView

    Quote Originally Posted by Zhengtao View Post

    About the textbox of the form, even when the background color of the webview is white, the background of the textbox is black and the text is in white by default, which is visiable in this case. But it is not the case on N97(5th edition), everything is white and text in the textbox is not visiable.
    Hi, just verified this. I'll add a bug about radiobutton rings and checkboxes.

    -janne

  6. #6
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    86

    Re: CheckBox, Ratio buttons, TextBox are not shown correctly in QWebView

    Hi Janne,

    Tomorrow, I will update you with the code and photo of how it looks like on the screen of the three mobile phones I mentioned.

    If it is a bug which i hope not, it maybe also the case for beta version which I am downloading now.

    Regards,
    Zhengtao

  7. #7
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    86

    Re: CheckBox, Ratio buttons, TextBox are not shown correctly in QWebView

    Hi,

    Here is some code and pictures. The html rendered is standard. I change the background of webview of N97 to black so that it shows clearly that text is in white which i tried to change by using the style tag in html. The text shown in the textbox of the form is always in white while it is not the case with the radio and checkbox text.

    Code:
    webView = new QWebView(this);
    connect(webView, SIGNAL(loadFinished(bool)), this, SLOT(load_done(bool)));
    
    webView->setPalette(Qt::white);
    webView->setAutoFillBackground(true);
    webView->setAttribute(Qt::WA_InputMethodEnabled,false);
    
    webView->load(QUrl(test.html));
    
    mainLayout = new QStackedLayout;	
    mainLayout->addWidget(webView);
    setLayout(mainLayout); 
    
    void WebWidget::load_done(bool ok){
    	if(ok)
    	   webView->showMaximized();
    	mainLayout->setCurrentIndex(0);
    }



    Regards,
    Zhengtao

  8. #8
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: CheckBox, Ratio buttons, TextBox are not shown correctly in QWebView

    Your images equal to my observations.
    I could link you the bug report but we are still in transition to moving to new bug reporting system that is not yet available for the public.
    Should be available very soon though.
    -Janne

  9. #9
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    86

    Re: CheckBox, Ratio buttons, TextBox are not shown correctly in QWebView

    Hi Janne,

    As far as these bugs are taken into account, I am happy that i find some bugs.

    By the way, from the image, you can also see that the dropdown list has the same problem (text is in white which is not visiable on N97).

    Regards,
    Zhengtao

Similar Threads

  1. Replies: 3
    Last Post: 2010-07-20, 11:07
  2. column list box not shown correctly in landscape mode.
    By praveena_R in forum Symbian User Interface
    Replies: 3
    Last Post: 2007-12-14, 10:14
  3. Checkbox and Radio buttons on (old) 3510i
    By davidgu in forum Mobile Java General
    Replies: 2
    Last Post: 2006-02-25, 06:31
  4. Smile File not shown correctly in MMS Presentation
    By jensbardel in forum General Messaging
    Replies: 0
    Last Post: 2006-01-18, 13:49
  5. Are List and TextBox titles shown on the Nokia 7650?
    By LiamQ in forum Mobile Java General
    Replies: 1
    Last Post: 2002-07-19, 08:17

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×