Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.4k Posts
  • How to connect a signal with dbus signature 'a{sv}'?

    Unsolved
    1
    0 Votes
    1 Posts
    426 Views
    No one has replied
  • Could not set cursor on screen HDMI1: -13

    Unsolved
    1
    0 Votes
    1 Posts
    262 Views
    No one has replied
  • Get not scaled paint device on QWidget::paintEvent (ignoring devicePixelRatio)

    Unsolved
    5
    0 Votes
    5 Posts
    736 Views
    SGaistS
    Did you already saw the Scalability part ? QPainter uses the devicePixelRatio of the target.
  • How to detect whether mouseEvents take place over this or not?

    Solved
    6
    0 Votes
    6 Posts
    504 Views
    D
    @SGaist, excellent. Needed that changeEvent to change color on enabled/disabled and for hit test rect().contains(releaseEvent->pos()) looks like working perfectly.
  • How to include .svg file in qtopenglwidget

    Unsolved
    8
    0 Votes
    8 Posts
    841 Views
    SGaistS
    Then make a texture out of it and render it as part of your scene with the rest of your assets.
  • Passing QWheelEvents to child causes infinite loop

    Unsolved
    6
    0 Votes
    6 Posts
    449 Views
    jeremy_kJ
    @PhabSeals said in Passing QWheelEvents to child causes infinite loop: I also can't send the wheelEvent directly to the child object because there is no way of accessing it in the QApplication event filter because the QApplication does not know if widgetInFocus is a MyWidget object or not. Presuming that MyWidget is registered with the metaobject system, ie uses Q_OBJECT, either of the following will resolve this question: !strcmp(widgetInFocus->staticMetaObject().className(), "MyWidget"); qobject_cast<MyWidget *>(widgetInFocus) != nullptr;
  • How to resize and make the new size persistent in QSvgWidget?

    Unsolved
    2
    0 Votes
    2 Posts
    461 Views
    D
    @Emon-Haque, took a while to figure out that setMaximumSize(QSize(14, 14)) is what I need in the constructor!
  • Multiple QAction and using sender() to get which got selected?

    Solved
    10
    0 Votes
    10 Posts
    2k Views
    C
    Appreciate the help, I'll take all your suggestions and learn from them. Thank you!
  • Problem setting up Curl

    Solved
    4
    0 Votes
    4 Posts
    316 Views
    SGaistS
    The rules on Windows to avoid DLL hell are pretty simple: Deploy the dlls your application requires in the same folder as your executable (plugins like Qt's own can live in different folders though). Do NOT install any dll in system folders. This can have unexpected side effects and wreak havoc. Unless really required (most of the time it's not), do not modify the PATH environment variable.
  • QTableWidget Sorting

    Solved
    3
    0 Votes
    3 Posts
    334 Views
    P
    That was it, thank you!
  • How to redirect "system" call results directly to widget ?

    Unsolved
    2
    0 Votes
    2 Posts
    139 Views
    Christian EhrlicherC
    Use QProcess and read stdout/stderr.
  • modbus component. a lot of crc errors.

    Unsolved
    3
    0 Votes
    3 Posts
    472 Views
    P
    Qt 5.11.3 I receive data from different devices and problem is everywhere.
  • This topic is deleted!

    Locked Unsolved
    5
    0 Votes
    5 Posts
    12 Views
  • QRegularExpression and Unicode Blocks

    Unsolved
    2
    0 Votes
    2 Posts
    276 Views
    VRoninV
    From https://doc.qt.io/qt-5/qregularexpression.html For an overview of the regular expression syntax supported by QRegularExpression, please refer to the [...] pcrepattern man page And from that page: The long synonyms for property names that Perl supports (such as \p{Letter}) are not supported by PCRE, nor is it permitted to prefix any of these properties with "Is". Basically: Qt uses pcre in QRegularExpression and that library doesn't support those blocks
  • Why mainwindow can still showmaximized() after setFixedSize()?

    Unsolved
    3
    0 Votes
    3 Posts
    349 Views
    C
    Qt does that because you asked it to do contradictory things and it has to choose one. If you do not want the window maximized then do not call showMaximized() and hide the maximize widget (https://doc.qt.io/qt-5/qwidget.html#windowFlags-prop) to make it difficult for the user to do it.
  • Is it possible to give a QML file to a Qt app executable?

    Solved
    4
    0 Votes
    4 Posts
    315 Views
    M
    Your answers help me a lot, I will try this based on your example, thanks !
  • Reading continuous from Console in qt5

    Unsolved
    17
    0 Votes
    17 Posts
    4k Views
    JonBJ
    @SGaist I have tried to ask/suggest that to the OP several times now....
  • How to animate/change color of QPixmap/QImage/QPicture/whatever on mouseEvents?

    Solved
    10
    0 Votes
    10 Posts
    1k Views
    D
    @eyllanesc, hmm not bad: [image: c36e825c-6b45-47e3-b86d-e9c3c69c5461.gif] would be nicer if there's some easy way to add a QPropertyAnimation for color. Instead of svg file there should be some way to use path data, to avoid DOM traversing, directly and animate its color.
  • Why doesn't QAction enter into event/eventFilter?

    Solved
    4
    0 Votes
    4 Posts
    306 Views
    D
    @eyllanesc, posted as another question.
  • QTableWidget Column Hold More Than One Item

    Solved
    3
    0 Votes
    3 Posts
    150 Views
    P
    Oh, right. Thanks, I just tried it and it works exactly. Just put it in an if-statement to check if it's at the end of the array so I can see if I need a comma or not.