Skip to content
  • 1 Votes
    5 Posts
    4k Views
    C
    QZoomableImage
  • Rendering error after changing the size of Window

    Unsolved QML and Qt Quick window image
    4
    0 Votes
    4 Posts
    1k Views
    DiracsbracketD
    @wangfys I got exactly the same behavior as you. Although I never used the scene graph before, your example (+ the doc and the Custom Geometry example in Qt's examples) gave me a little crash course in the topic. http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html Your example really should work as it seems you did everything as required by the doc. At my side, the lines become visible once I hover the mouse one the exit button. Possibly this is a bug? PS. Again, not being useful, I maybe I could suggest you to change the definition of your points from QVariantList points; to QVector<QPointF> points; Then you can use: const float x = static_cast<float>(points[i].x()); const float y = static_cast<float>(points[i].y()); vertices[i].set(x, y); rather than vertices[i].set(points[i].toPointF().x(), points[i].toPointF().y()); as it saves you a couple of calls to toPointF().
  • 0 Votes
    2 Posts
    3k Views
    SGaistS
    Hi, Did you already saw the related part of QIcon’s documentation ?
  • 0 Votes
    9 Posts
    10k Views
    K
    @Devopia53 It works! , Thanks.
  • Image, loading *.pkm file(ETC1) issue

    Unsolved QML and Qt Quick pkmfile image etc1compression
    1
    0 Votes
    1 Posts
    962 Views
    No one has replied
  • macOS Image Gallery deploy

    Solved QML and Qt Quick qml qtquick image osx macosx
    2
    0 Votes
    2 Posts
    867 Views
    shavS
    Hi everyone! I've solved this problem. In my case the problem was in asynchronous load images into another thread. When I changed asynchronous method to the synchronous all work fine.
  • Exif Meta info for JPG and PNG

    Unsolved General and Desktop c++ png jpg exif image
    2
    0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, AFAIK, PNG doesn't contain the same meta data so you won't be able to use QExifImageHader to read them.
  • Resize image with mouse QTextEdit

    Solved General and Desktop image resize qtextedit mouse
    10
    0 Votes
    10 Posts
    5k Views
    S
    @mrjj I don't want to resize it via a dialog. I need to do that with the mouse (manually)
  • Compare two images for similarity

    Unsolved General and Desktop image image processin
    6
    0 Votes
    6 Posts
    2k Views
    raven-worxR
    @sush this is actually outside of the scope of Qt. You should use a graphics processing library (like OpenCV - i don't know if it offers such functionality) to do such stuff. Or you need to implement an appropriate algorithmn yourself which uses the Qt API to access the pixel data. This is by far a complicated topic. You may want to read the following links: Overview Perceptual Image Diff lib QGoImageComapre
  • 0 Votes
    13 Posts
    6k Views
    A
    @Avec Oh duh.. I should have thought of that as a potential reason. I just assumed that you were in the directory with the files as your current dir. Glad it's all solved. :)
  • 0 Votes
    3 Posts
    2k Views
    D
    Thanks for the link ! I haven't yet been able to get it working. But I suspect I should probably be using a Loader with a Canvas component, instead of a simple Image element. I'll test it out and let you know. If anyone has a working code, don't hesitate to share ^^ I'm sure it would be a great example to include in the docs. Daniel
  • 0 Votes
    2 Posts
    2k Views
    T
    Well one way to do it is to use QWebEnginePage::runJavaScript but be careful it executes asynchronously! http://doc.qt.io/qt-5/qtwebenginewidgets-qtwebkitportingguide.html then in your javascript - find IMG element by id/class/whatever and set its contents like an embedded image e.g. change src to src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==' this is example 1x1 pixel black dot image you'll have to substitute with your own image data base64 encoded and of course change image format if you're not using png to data:image/jpg(whatever)
  • Save Image of QGraphicview in SqlServer

    Unsolved General and Desktop sqlserver qt 5.4 image saving
    11
    0 Votes
    11 Posts
    4k Views
    mrjjM
    @M4RZB4Ni yes, the big question is if they are on same lan/network. :)
  • OpenGL Image Load/Store using Qt 5.7?

    Unsolved General and Desktop qt5 opengl shader qt5.7 image
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    3 Posts
    2k Views
    ekkescornerE
    cool :) now the image is always correct positioned and visible while zoom-in/out or fit-into-screen QtCon2016 - Room Info to Session
  • Clip QML Types with Context2D

    Unsolved QML and Qt Quick context canvas image qml types
    4
    0 Votes
    4 Posts
    3k Views
    ?
    Out of curiosity, I implemented a QQuickPaintedItem-based PathMask type. The result looks like this: [image: Path_Mask.png] The code is: pathmask.h #ifndef PATHMASK_H #define PATHMASK_H #include <QObject> #include <QQuickItem> #include <QQuickPaintedItem> #include <QPainter> #include <QPainterPath> class PathMask : public QQuickPaintedItem { Q_OBJECT public: explicit PathMask(QQuickItem *parent = Q_NULLPTR); ~PathMask(); virtual void paint(QPainter *painter); Q_INVOKABLE void beginPath(); Q_INVOKABLE void moveTo(qreal x, qreal y); Q_INVOKABLE void lineTo(qreal x, qreal y); Q_INVOKABLE void closePath(); private: QPainterPath *m_path{Q_NULLPTR}; }; #endif // PATHMASK_H pathmask.cpp #include "pathmask.h" #include <QPainterPath> #include <QtMath> PathMask::PathMask(QQuickItem *parent) : QQuickPaintedItem(parent) { } PathMask::~PathMask() { delete m_path; } void PathMask::paint(QPainter *painter) { if (m_path) { painter->setRenderHint(QPainter::Antialiasing); painter->setBrush( QBrush(QColor("black")) ); painter->drawPath( *m_path ); } } void PathMask::beginPath() { delete m_path; m_path = new QPainterPath; update(); } void PathMask::moveTo(qreal x, qreal y) { Q_ASSERT(m_path); m_path->moveTo(x,y); } void PathMask::lineTo(qreal x, qreal y) { Q_ASSERT(m_path); m_path->lineTo(x, y); } void PathMask::closePath() { Q_ASSERT(m_path); m_path->closeSubpath(); update(); } main.qml import QtQuick 2.5 import QtQuick.Controls 2.0 import QtQuick.Controls.Material 2.0 import QtGraphicalEffects 1.0 import io.qt.forum 1.0 ApplicationWindow { title: "PathMask Demo" visible: true width: 400 height: 400 color: "black" Image { id: src anchors.fill: parent visible: false source: "file:///home/patrick/Downloads/f22.jpg" } PathMask { id: mask anchors.fill: parent visible: false } Component.onCompleted: { mask.beginPath() mask.moveTo(360, 200); var Pi = 3.141592653589793238463; for (var i = 1; i < 5; ++i) { mask.lineTo(200 + 160 * Math.cos(0.8 * i * Pi), 200 + 160 * Math.sin(0.8 * i * Pi)); } mask.closePath(); } OpacityMask { anchors.fill: src source: src maskSource: mask } }
  • QML Image zoom screenshot

    Solved QML and Qt Quick qt 5.7 image screenshot
    2
    0 Votes
    2 Posts
    2k Views
    eirihamE
    Got it to work. Only had to do this: @ //Screenshot button RectangularButton{ id: screenshotButton text: "Screenshot" anchors.bottom: parent.bottom anchors.right: savePictureButton.left anchors.margins: 10 onClicked: { //Take screenshot of the image flick.grabToImage(function(result) { snapController.url = result.url }, Qt.size(snapshotViewItem.width,snapshotViewItem.height)); //Update zoom and update image to save flick.contentHeight = flick.height flick.contentWidth = flick.width } } @
  • Save Image to Android device

    Solved Mobile and Embedded android qurl image save qt 5.7
    24
    0 Votes
    24 Posts
    14k Views
    M
    @Qojote Thank you and congratulations for giving all the details for solving this old and apparently common problem! Without the smallest details, this kind of things are never solved.
  • 0 Votes
    2 Posts
    2k Views
    A
    Hi, QPainter can draw a QImage. So you can for example create a new Widget, subclass for QLabel for example if you want and reimplement paintEvent. Like this you work all the time with your QImage without creating another one. And better you can only update the region that changed, no need to refresh everything. I did not try it but it should work. Sincerely
  • 0 Votes
    6 Posts
    2k Views
    H
    I have found the problem. I have added on build folder libeay32.dll and ssleay32.dll but not on deploy folder