Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. zoom
    Log in to post

    • UNSOLVED Why my scrollbars are not updating their total scroll size when content size changes?
      QML and Qt Quick • size zoom scroll scroll bar page • • jeanmilost  

      2
      0
      Votes
      2
      Posts
      64
      Views

      @jeanmilost Your logic seems to be correct. What you have to do is to move the re-calculation of Scrollbar size & position to the Rectangle rcPageContainer because you are applying scale for that. Rectangle { id: rcPageContainer objectName: "rcPageContainer" ... /// called when page viewport width changed onWidthChanged: { sbHorz.size = rcPageViewport.width / rcPageContainer.width sbHorz.position = Math.min(Math.max(sbHorz.position, 0.0), 1.0 - (sbHorz.size)); } /// called when page viewport height changed onHeightChanged: { sbVert.size = rcPageViewport.height / rcPageContainer.height sbVert.position = Math.min(Math.max(sbVert.position, 0.0), 1.0 - (sbVert.size)); } }
    • UNSOLVED zooming an SVG image
      QML and Qt Quick • qml image memory zoom scale • • Marc_Van_Daele  

      1
      0
      Votes
      1
      Posts
      227
      Views

      No one has replied

    • UNSOLVED Zoom in and out of a QTextEdit with touch pad gestures?
      General and Desktop • qtextedit zoom gestures gesture • • legitnameyo  

      13
      0
      Votes
      13
      Posts
      1118
      Views

      The following partially works and I post in the hopes that someone might get an idea that will fix my issue :) bool ZoomCode::event(QEvent *event) { if (event->type() == QEvent::NativeGesture) { return gestureEvent(static_cast<QNativeGestureEvent*>(event)); } return QWidget::event(event); } bool ZoomCode::gestureEvent(QNativeGestureEvent *e) { float value = e->value(); textEdit->setFontPointSize(NULL); // zoom does not work without this textEdit->selectAll(); // some part of the text has to be selected before the zoom in the text starts to work. It does NOT matter if it is the WHOLE text or just a character in the text, just as long as something gets highlighted. Afterwards, nothing has to be highlighted again for the zoom to work. The zoom works on the whole text, no matter what part has been highlighted. if(value >0) { zoomIn(value + 5); // + 5 to add some zoom strength } else if(value < 0) zoomOut(value - 5); // -5 to add some zoom strength } }
    • UNSOLVED Paint Event and Zoomed In Image Problem
      General and Desktop • qlabel size zoom painter paint event • • Nalu323  

      4
      0
      Votes
      4
      Posts
      638
      Views

      @mrjj I tried your code, here's the result:
    • UNSOLVED Is there a simple way to use pinch to zoom an image at the center of the pinch gesture?
      QML and Qt Quick • qml image zoom pincharea pinch • • larkei15  

      5
      1
      Votes
      5
      Posts
      2119
      Views

      QZoomableImage
    • UNSOLVED Canvas/QPainter bug
      QML and Qt Quick • qpainter zoom canvas • • f.serreau  

      2
      0
      Votes
      2
      Posts
      1063
      Views

      Hi @f.serreau I have tested your example, and it works correctly with no errors. I tested it on Windows 10 (Fall Update), MS VS2017 and Qt 5.11.0.
    • SOLVED QNativeGestureEvent Mac OSX TrackPad finger Capture Operation zoom Solved. :-)
      General and Desktop • macosx zoom qnativegesturee trackpad • • patrik08  

      2
      0
      Votes
      2
      Posts
      697
      Views

      Thanks for sharing your findings !
    • UNSOLVED QtChart & Gestures
      Mobile and Embedded • ios zoom qtchart 5.8 • • J.Hilk  

      1
      0
      Votes
      1
      Posts
      521
      Views

      No one has replied

    • SOLVED QGraphicsItem gets selected when clicking outside of visible shape
      General and Desktop • qgraphicsview qgraphicsscene qgraphicsitem qt4 zoom • • Vaniax  

      9
      0
      Votes
      9
      Posts
      4962
      Views

      :D I haven't had much time to test if the bug exists in Qt5. I'll check it out and update the topic accordingly. If the bug is still there, of course, I will submit the fix. Thanks for your time.
    • SOLVED Zoom QCameraViewfinder Video possible?
      General and Desktop • video zoom scale qcameraviewfind • • pauledd  

      2
      1
      Votes
      2
      Posts
      1203
      Views

      I think I found a solution. I roughly quadrupled the QCameraViewfinder size and repositioned it to the middle. Its all done with "cameraVf->setGeometry(x,y,x,y);". And I parented the viewfinder to a new QFrame to have a frame and to have the viewfinder not overlaying the start button. mainwindow.cpp ... QFrame *frameVideo = new QFrame(frame4); // extra frame where the video is in frameVideo->setGeometry(5,35,375,380); camera = new QCamera("/dev/video0"); cameraVf = new QCameraViewfinder(frameVideo); camera->setViewfinder(cameraVf); cameraVf->setGeometry(0,0,375,380); QCameraViewfinderSettings vfsettings; vfsettings.setPixelFormat(QVideoFrame::Format_YUV420P); vfsettings.setResolution(640,480); camera->setViewfinderSettings(vfsettings); cameraVf->show(); ... void MainWindow::onZoomClicked(){ if(cameraVf->width() != 1600) { cameraVf->setGeometry(-590,-490,1600,1440); // zoom in } else { cameraVf->setGeometry(0,0,375,380); // zoom out } }
    • UNSOLVED Disable/Overwrite minimumZoomLevel of map
      QML and Qt Quick • qml map zoom location • • ginkgoguy  

      1
      0
      Votes
      1
      Posts
      461
      Views

      No one has replied

    • SOLVED Zoom in QGraphicsView
      General and Desktop • qgraphicsview zoom • • Walux  

      4
      0
      Votes
      4
      Posts
      1118
      Views

      @Joel-Bodenmann @raven-worx They're all good answers :) Thank you very much :)
    • how to sync zoom in two graphicviews with a single mouse wheelevent.
      General and Desktop • zoom qframe graphicview • • vinay133  

      2
      0
      Votes
      2
      Posts
      907
      Views

      Hi and welcome Many ways to do this, but here is my suggestion. Add a signal to your graphicview class signals: void MWheelActivated(bool ZoomIn); and hook it up to a slot in your mainwindow with the connect function. http://doc.qt.io/qt-5.5/signalsandslots.html then in GraphicsView::wheelEvent(QWheelEvent *e) you emit MWheelActivated ( (e->delta() > 0)); and No zooming here! Then in mainwindow slot mainwindow:: MWheelActivated ( bool ZoomIn ) { if ( ZoomIn ) { view1->zoomIn ( 6 ); view2->zoomIn ( 6 ); } else { view1->zoomOut ( 6 ); view2->zoomOut ( 6 ); } } Hope it helps.
    • Any examples of drawing linear graph with pinch to zoom functionality ?
      QML and Qt Quick • qtquick zoom canvas • • vishnu  

      7
      0
      Votes
      7
      Posts
      3161
      Views

      @vishnu RightClick > View Page Source ;)
    • What should I use for 2D and 3D image visualisation with pan and zoom?
      General and Desktop • image zoom • • pauljurczak  

      6
      0
      Votes
      6
      Posts
      1961
      Views

      The documentation of Qt3D is getting improved to match Qt's standard. The module with Qt 5.5 is a tech preview
    • Extending QCustomplot zoom feature to Android.
      QML and Qt Quick • zoom qcustomplot pinch • • vishnu  

      1
      0
      Votes
      1
      Posts
      1252
      Views

      No one has replied

    • QwtPlot zooming logarithmic scale
      3rd Party Software • widget qwt zoom scale logarithmic • • HappyCoder  

      2
      0
      Votes
      2
      Posts
      3893
      Views

      @HappyCoder Out of personal experience I recommend also to ask your question on QWT mailing list AFAIK QWT is still independent and only based on Qt libs. Uwe has been monitoring this forum in the past, but answers are potentially faster through QWT mailing list.
    • [SOLVED] Scroll and Zoom on Android and iOS platform ?
      Mobile and Embedded • android ios qwidget mobile zoom scrolling scrollarea • • NGV1  

      4
      0
      Votes
      4
      Posts
      1701
      Views

      So, finally I used a QGraphicsView and a QGraphicsScene in which I add my QWidget and now I can use the scroll (with the dragMode). I didn't implemented the zoom yet, but it I'm working on. Thanks a lot for your help
    • Scroll and Zoom on Android and iOS platform ?
      Mobile and Embedded • android qwidget ios qmainwindow zoom touch scrolling • • NGV1  

      1
      0
      Votes
      1
      Posts
      582
      Views

      No one has replied