Results 1 to 2 of 2

Thread: QML TextArea zooming/scaling

  1. #1
    Join Date
    Dec 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default QML TextArea zooming/scaling

    Hello all! I am fairly new to Qt, and I have question to ask the more experienced Qt developers. I am planning on developing a simple eTextbook application using a proprietary format. I just need it to be basic (formatted text, tables, lists, images, highlighting text). I thought that using the QTextDocument structure with a TextArea QML item to display it would be a good combination. I wanted to implement zooming capabilities that would scale everything (images included), not just increasing the text size. I can do this by scaling the contentItem of the TextArea (and also using Qt rendering, instead of native for better scaled text). If I scale large enough, I would need the scrollbars to shrink in width, indicating there is an increasing area to be panned. I thought I could trick the scroll view into this by scaling the contentItem.width and contentItem.height by the same factor to achieve this. Unfortunately, this does not seem to work. Any ideas? Is this even the best approach for an eTextbook reader? FYI, I looked into poppler and mupdf, but decided against those due to the GPL license

    Thank you very much for your time and input!

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QML TextArea zooming/scaling

    What if you scale the text area an put it into a scrollview to provide the panning?

    Cheers,
    _

Similar Threads

  1. qml Textarea
    By codeman in forum Qt Quick
    Replies: 4
    Last Post: 13th January 2014, 18:51
  2. QtWebKit and clickEvent from textarea
    By keen in forum Qt Programming
    Replies: 0
    Last Post: 30th June 2010, 15:15
  3. Replies: 4
    Last Post: 8th May 2009, 12:04
  4. Zooming effect by scaling widgets
    By Cruz in forum Qt Programming
    Replies: 3
    Last Post: 1st February 2009, 09:43
  5. Scaling and zooming with logarithmic scales
    By Benoît Hubert in forum Qwt
    Replies: 1
    Last Post: 11th September 2008, 09:17

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.