Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Input type="file" QWebview

Input type="file" QWebview

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 1 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    k1mray2000
    wrote on last edited by
    #1

    I'm using Qt 5.3.1 for msvc 2012 to create an application that has a QWebView. The body of the html file used looks like

    @
    <body>
    <div id="mainView" ></div>
    <div class="fileinputs" >
    <input type="file" class="file" />
    </div>
    </body>
    @

    However the input (Choose File button) is not displayed in the QWebview. All I see is black space where I would expect the button. I have loaded the html file into Google Chrome and the Choose File button was displayed as expected. Why doesn't it show up in my QWebView?

    (FYI, the height and width for mainView are set at 95% and 100% respectively, and the height and width for fileinputs is set at 5% and 100% respectively. The code tag doesn't display this properly.)

    1 Reply Last reply
    0
    • K Offline
      K Offline
      k1mray2000
      wrote on last edited by
      #2

      I figured out what was happening, in an effort to make the QWebview/QWebPage transparent, I was using a palette where the brush was set to transparent. I had also implemented the paintEvent function in my custom QWebView. I only managed to changed the color from white to black, which looked marginally better than white. Once I removed these edits, I was able to see the button.

      Now on to figure out how to have the QWebView blend in with the rest of my application.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved