Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. draw

    Log in to post
    • All categories
    • A

      Unsolved Implementing QAbstractTextDocumentLayout::draw
      General and Desktop • qabstracttextdo draw qpainter documentlayout widgets • • Arthur Araruna

      2
      0
      Votes
      2
      Posts
      430
      Views

      Trilec

      Hi Arthur,
      Sorry you did not get any feedback for your issue after so long, shows there must be a minimal use or understanding of this class. Did you get help or find solution you can share. I'm also trying to find help using this class and lack of doc is still there I'm afraid.

      One possibility is to look at KoTextDocumentLayout.h and cpp files, these might help with some information.

      https://github.com/JeremiasE/KFormula/blob/gsoc/libs/kotext/KoTextDocumentLayout.h

    • N

      Solved How to draw on Image loaded in a QGraphicsView
      General and Desktop • draw qgraphicsview c++ c++ qt class • • Nico1564

      22
      0
      Votes
      22
      Posts
      11392
      Views

      A

      @Nico1564 said in How to draw on Image loaded in a QGraphicsView:

      Yeah i know that this work but i need to draw with fonctions. I successed to do that but I don't want to have the GraphicsView at the beginning of the program, and i want to add draws like an Ellipse (and the image) when i click on buttons.

      These lines could just as well happen inside a button click

      QGraphicsEllipseItem* testItem = new QGraphicsEllipseItem(20,30,120,70,0); m_pScene->addItem(testItem);

      In that case, you would create an ellipse every time you pressed that button.

      I don't quite understand the "I don't want to have the GraphicsView at the beginning of the program" - maybe you could elaborate on that.

    • M

      Unsolved Draw a widget on top af everything else
      General and Desktop • widgets layouts draw windowflags • • MoaMoaK

      1
      0
      Votes
      1
      Posts
      670
      Views

      No one has replied

    • T

      Unsolved Draw on a QChart
      General and Desktop • charts graphics view draw • • Totoro

      1
      0
      Votes
      1
      Posts
      948
      Views

      No one has replied

    • Clockwork

      Unsolved Qt and OpenGL in Widget: Can't use glDrawArrays
      Game Development • opengl rendering triangle shaders draw • • Clockwork

      2
      0
      Votes
      2
      Posts
      2831
      Views

      johngod

      Hi Clockwork

      I didnt read your code with much attention, but for starters if all you want is draw a triangle, check this tutorials I did https://bitbucket.org/joaodeusmorgado/opengltutorials
      I'm using vbos, to draw triangles. I'm using all OpenGL native calls, but should be pretty easy to convert to Qt OpenGL functions. I also recommend you this book wich is great, it has a lot of details that usually are ommited in other books http://alfonse.bitbucket.org/oldtut/index.html

    • M4RZB4Ni

      Solved Send action Codes to PushButton
      General and Desktop • action push button draw lines • • M4RZB4Ni

      10
      0
      Votes
      10
      Posts
      2911
      Views

      SGaist

      You could use a QRubberBand to setup the line and once you release it add the QGraphicsLineItem to your scene.

    • Q

      Solved Set tableWidget item background color 60% red and 40% white
      General and Desktop • draw background color • • qDebug

      3
      0
      Votes
      3
      Posts
      1171
      Views

      Q

      Thank you!

      Just perfect! :D

    • AlvaroS

      Unsolved Draw a line in Scene (not adding)
      General and Desktop • scene draw qpainter • • AlvaroS

      6
      0
      Votes
      6
      Posts
      2688
      Views

      mrjj

      @AlvaroS
      ok. seems a bit messy.
      Do you really need a QGraphicsScene then ?
      You could also draw it as a custom control. you need zooming etc ?

      In any case, did u see this example
      http://doc.qt.io/qt-5/qtwidgets-graphicsview-diagramscene-example.html

      it even has arrowhead class :)

    • AlvaroS

      Unsolved Draw a head arrow
      General and Desktop • arrow draw scene • • AlvaroS

      2
      0
      Votes
      2
      Posts
      11607
      Views

      mrjj

      The sample
      http://doc.qt.io/qt-5/qtwidgets-graphicsview-diagramscene-example.html
      has arrow class.
      Maybe it can provide inspiration.

    • S

      Solved Improving drawing/painting performance
      General and Desktop • paint draw thread • • SysTech

      12
      0
      Votes
      12
      Posts
      8676
      Views

      kshegunov

      @SysTech

      Thanks again!

      You're very welcome.

      Those 3D displays are kind of handy for visualizing the radio output but they are right now pretty CPU intensive.

      If I may insert yet another suggestion here. While I don't believe you'd gain much by using OpenGL painting for the "waterfall" data, I think switching to it for the 3D displays would work better. I nice side effect would be that you can also render OpenGL from different threads, provided the appropriate locking mechanisms are in place. You could, as the most simple test, try using QOpenGLWidget for those FFT displays.

      Kind regards.

    • Cranberriess

      Unsolved Crash while drawing text ?
      Mobile and Embedded • crash qt4.8.6 qpainter draw • • Cranberriess

      1
      0
      Votes
      1
      Posts
      1368
      Views

      No one has replied

    • as2388

      Unsolved How to Efficiently Draw a QImage to a Window.
      General and Desktop • qimage draw • • as2388

      19
      0
      Votes
      19
      Posts
      11545
      Views

      kshegunov

      @as2388

      Yes there is, do the drawing in another thread on a QImage and then trigger the update with that image.

      I'd add to @SGaist's great point - even convert the image to a QPixmap in the worker (after drawing it), and in the paint event just splat it onto the widget.

    • D

      Unsolved Diagram connector algorithm
      General and Desktop • draw diagram qgraphicsscene line • • dridk

      1
      0
      Votes
      1
      Posts
      792
      Views

      No one has replied

    • R

      Unsolved Qt Diagramming libraries
      General and Desktop • diagram diagramming graph graphing draw • • Ramin

      5
      0
      Votes
      5
      Posts
      2274
      Views

      TheBadger

      @Ramin
      Actually I have never seen such a library.

      What I have done in the past (3 years ago) was to draw some elements connected to each other using Qt Quick (QML) and it worked pretty good.

      Another option is to look at the new modelling plugin that will be part of Qt Creator 3.6. And since Qt Creator is open source, you can look at how it is done and perhaps use that as a starting point.