Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Minimum required width of a QTextBrowser containing HTML table.
Forum Updated to NodeBB v4.3 + New Features

Minimum required width of a QTextBrowser containing HTML table.

Scheduled Pinned Locked Moved India
2 Posts 2 Posters 2.8k Views 1 Watching
  • 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.
  • E Offline
    E Offline
    er.akhilagarwal
    wrote on last edited by
    #1

    Hi,

    I am new to Qt.

    I am using a QTextBrowser to display HTML table. I need to resize the browser to minimum size that would be enough to show the table properly without scrollbars.

    @
    QTextBrowser browser = new QTextBrowser();
    QString html("<table width =100% > <tr><td>col1</td><td>col2</td></tr><tr><td>val1</td><td>val2</td></tr></table>")
    browser->insertHtml(html);
    QTextDocument doc = browser->document();
    browser->resize(doc->pageSize().width(), doc->size().height());
    @

    This returns me the corrent height but not width. No matter what my columns data is it returns me 288 as width.

    But this code works fine if I remove width attribute from my html table tag.

    How to find the minimum required width for a QTextBrowser??

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rraj
      wrote on last edited by
      #2

      Hi...
      I am searching for full source code for facebook qt.I have downloaded the source code from the below link:

      https://gitorious.org/qfacebook

      but during compilation i am geting error "qjson.pro not found". I have searched for qjson.pro in qjson directory its empty.I think I am not geting the complete source code.
      can anyone suggest any link from where i can download the full code for facebook qt source.

      Thanks
      rraj

      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