Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.2k Topics 455.4k Posts
  • Quaternion rotation in 3D

    Unsolved
    4
    0 Votes
    4 Posts
    641 Views
    Pl45m4P
    @viniltc You can use Qt3D (C++ or QML) for that. You can use just a standard cube (other basic shapes are supported) or you could create your own mesh / .obj - file with e.g. Blender and import it. Qt3D https://doc.qt.io/qt-5/qt3d-index.html Here are some examples https://doc.qt.io/qt-5/qt3d-examples.html. I can recommend the ShadowMap QML Example (QML) and the Basic Shape C++ Example You can set the transformation by using QQuaternion and your quaternion data directly https://doc.qt.io/qt-5/qquaternion.html
  • Show waveform from mp3 file on mac

    Unsolved
    4
    0 Votes
    4 Posts
    676 Views
    Kent-DorfmanK
    there are open source MP3 decoder libraries. google search: "mp3 decoder library sourcecode"...
  • Custom delegates, editors, and "chicken or egg" problem

    Solved
    4
    0 Votes
    4 Posts
    361 Views
    R
    I think this is now solved ... I can follow the example of "Star Delegate" almost verbatim.
  • Is there any cases where QObject will not emit a destroyed signal?

    Unsolved
    3
    0 Votes
    3 Posts
    823 Views
    JonBJ
    @J-Hilk , @MalachiCole I haven't read through the code, and don't know what exactly it calls, but since the OP asks about "edge case" and "absolutely critical", is there any kind of indirect dynamic memory allocation going on here at all? Just that it always possible that the application runs out of memory while executing the code, a slight possibility to be aware of. No more than that.
  • qobject_cast doesn't work with QWT type

    Solved
    10
    0 Votes
    10 Posts
    680 Views
    Please_Help_me_DP
    @Pl45m4 thank you a lot!
  • How can i perform Zoom-in And Zoom-Out Functionality on QLabel using Mouse Scroll

    Solved
    2
    0 Votes
    2 Posts
    541 Views
    jsulmJ
    @Ketan__Patel__0011 Subclass QLabel and override https://doc.qt.io/qt-5/qwheelevent.html
  • How to add a row of widgets army run time

    Unsolved
    3
    0 Votes
    3 Posts
    289 Views
    Pl45m4P
    @TimothyCole In addition to what @jsulm said: All you could do is creating a custom widget (UI in Designer) and promote it or add it at runtime to your parent layout. If you only need one or two, it's not efficient, but if you need like five or more layout rows with the same content (ComboBox + StackedWidget) and you dont want to use a static number of rows, it is worth it. Edit: There is also an QUiLoader [click] to load pre-designed UI-files at runtime (then you dont need to create a custom class for your content. Just insert your rows by loading your UI file multiple times and adding the result to your parent layout)
  • Home path is translated into /run/user/1000

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    D
    @SGaist Snapcraft and appImage are not exactly the same thing. Anyway, if someone else is trying to "snap" a Qt app using a different version then the old ones coming with snapcraft, I created a small project where you may find an hint: https://github.com/jdelromano/snapqt5
  • Mainwindow and Second window closes after saving QTableWidget contents in .csv file.

    Solved
    4
    0 Votes
    4 Posts
    229 Views
    R
    @J-Hilk Yes row index was getting out of range, Thanks :)
  • How Can I make Clickable Label in My Project

    Solved
    19
    0 Votes
    19 Posts
    6k Views
    Ketan__Patel__0011K
    @anil_arise Can you share this link again plzzzzz
  • Error building sample GUI application Qt 5.14.1 with Visual stuido 2019(v.16.4.5)

    Unsolved
    1
    0 Votes
    1 Posts
    74 Views
    No one has replied
  • How to use QProcess for some program like "bluetoothctl"

    Solved
    6
    0 Votes
    6 Posts
    678 Views
    MihanM
    @JonB @jsulm I think I know the problem. It should be receive "\n" to confirm the command!
  • Mapping from a promoted class

    Unsolved
    10
    0 Votes
    10 Posts
    396 Views
    V
    @jsulm Thanks a bunch! Done and done! Now my only battle is scaling my line with the label. Remember, the line is cvLine and not Qline in the video. Thank you once again for your support.
  • QLineedit inputmask and settext

    Unsolved
    7
    0 Votes
    7 Posts
    872 Views
    jsulmJ
    @Kutyus Did you try to disable the input mask, then set the string and then enable the input mask again?
  • Is it possible to draw a colored rectangle on a toolButton?

    Unsolved
    4
    0 Votes
    4 Posts
    378 Views
    jsulmJ
    @Yue-JIN Yes, with your QToolButton subclass you have to
  • Can we create labels based on data automatically

    Solved
    4
    0 Votes
    4 Posts
    231 Views
    R
    @mrjj @Christian-Ehrlicher Thanks for reply
  • Can't set opacity to QLinearGradient

    Unsolved
    3
    0 Votes
    3 Posts
    785 Views
    Please_Help_me_DP
    @mrjj thank you for answer I'm sorry, I forgot to add lines where I apply QLinearGradient to the curve that was generated with QwtPlotCurve: QwtPlotCurve *curve = new QwtPlotCurve(); QLinearGradient linearGrad(QPointF(0, 0), QPointF(1, 0)); linearGrad.setCoordinateMode(QGradient::ObjectMode); linearGrad.setColorAt(0, Qt::yellow); linearGrad.setColorAt(0.5, Qt::red); linearGrad.setColorAt(1, Qt::cyan); QGraphicsOpacityEffect* opacity = new QGraphicsOpacityEffect; opacity->setOpacity(0); opacity->setOpacityMask(linearGrad); curve->setBrush(linearGrad); So the filled area is the area between the curve and some baseline located at y=10000 I found a way to set opacity of each color like: QColor green70 = Qt::green; green70.setAlphaF(0.7); // here we set the opacity (or more likely transparency) linearGrad.setColorAt(1, green70); That works but if I want to change the opacity I would need to change alpha of every color in loop. Actually that is not so bad but I'm trying to implement linear colorbar where colors are linearly changeable and they are set by some value (not by a name like red or green).
  • QtCreator uses wrong c++ for hints...

    Unsolved
    3
    0 Votes
    3 Posts
    219 Views
    D
    Looks primising, will give it a go thanks! Yeah I upgraded and then downgraded again.
  • How to create an invalid QItemSelection

    Unsolved
    2
    0 Votes
    2 Posts
    193 Views
    Christian EhrlicherC
    @Infinity said in How to create an invalid QItemSelection: How can I create a QItemSelection which contains two invalid indexes why? A QItemSelection is basically a list of selection ranges So no, it's not possible (and not needed)
  • Show QImage information on QTextBrowser

    Solved
    5
    0 Votes
    5 Posts
    456 Views
    S
    @mrjj Hi, I see. I didn't realize enum is a type. This works, can mark this thread as solved. Thanks a lot