Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Interface a USB HID device frow Qt (Windows)

    8
    1 Votes
    8 Posts
    20k Views
    D
    Hey Carl evening I am facing the same problem! If you got the solution so, please reply.
  • Qt Canbus Peak Plugin does not send frames, only buffers them.

    Unsolved
    1
    0 Votes
    1 Posts
    152 Views
    No one has replied
  • Windeploy

    Solved
    3
    0 Votes
    3 Posts
    364 Views
    serkan_trS
    @SGaist yes thanks i was running windeployqt located in wrong folder
  • QT COM Support For Dual Interface

    Unsolved
    15
    0 Votes
    15 Posts
    1k Views
    hskoglundH
    Yes that is the QAXFACTORY_BEGIN() macro.
  • How to correct map bias in qtlocation source code when using google china map

    Unsolved
    1
    0 Votes
    1 Posts
    158 Views
    No one has replied
  • 0 Votes
    19 Posts
    3k Views
    JonBJ
    @RTEDFD https://bugreports.qt.io/browse/QTBUG-100349 states: Should be fixed in Qt 6.6 https://codereview.qt-project.org/c/qt/qtbase/+/437009 You can now pass a QTimeZone to any of the QFileInfo file times related methods to specify which time zone returned times should be in So should apply to e.g. birthTime() too, but awaits Qt6.6..
  • Signals and Slots with QMenu and QMessageBox

    Unsolved qwidget qmenu qmenubar qmessagebox signals & slots
    7
    0 Votes
    7 Posts
    3k Views
    S
    Well, Qt has both a QMenu and a QMenuItem. Only the QMenuItem is supposed to trigger actions. The QMenu itself only has QMenuItems and submenus. So, its action is already defined. Usually, the QMenuItems have QActions associated with it. For the QMenu::triggered signal the documentation states: This signal is emitted when an action in this menu is triggered. To me this reads that you have several entries inside the QMenu and one of these entries triggers an action. This is also why this signal contains the QAction as a parameter. My understanding would mean that clicking on the QMenu itself does not emit a triggered signal, but only clicking on a QMenuItem does.
  • Changing colors of png icon in widget

    Unsolved
    2
    0 Votes
    2 Posts
    335 Views
    Christian EhrlicherC
    @Recursion said in Changing colors of png icon in widget: So is there a way to programmatically change that red png needle to say a blue png needle on the fly? I know for sure that I could make a version of the png file in a number of different colors and those would be the only colors a user could choose from but its not ideal. You have to do it by your own by programatically changing the colors
  • 0 Votes
    2 Posts
    248 Views
    J
    New functionality in the core OpenGL 4.1 specification includes: Full compatibility with OpenGL ES 2.0 APIs for easier porting between mobile and desktop platforms; So, QOpenGLFunctions_4_3_Compatibility must be full compatibility with OpenGL ES 2.0 APIs. Is my understanding correct?
  • UART terminal

    Unsolved
    15
    0 Votes
    15 Posts
    1k Views
    A
    @mpergand Thanks to all Now I have found temporary descision based on insertPlainText of QTextEdit Class
  • Equivalent to Windows MessageBeep(type)

    Unsolved
    1
    0 Votes
    1 Posts
    286 Views
    No one has replied
  • QSerialPort - readAll stops after CR

    Unsolved
    5
    0 Votes
    5 Posts
    495 Views
    O
    @hkottmann as @JonB points, you have to add the recived data to a buffer and parse it. As you are receiving Modbus responses, the protocol tells you how to calculate how long the response will be, so you know how many bytes are you expecting.
  • How to pass non-basic existing Qt type from QML to C++

    Solved
    6
    0 Votes
    6 Posts
    540 Views
    A
    @dalishi I haven't worked with that module, so I don't know how the QML data is structured. Typically, a QML type is implemented in terms of a (private API) C++ class, and maybe you can look it up in Qt source code.
  • QOpenGlWidget - Best way to detect monitor/DPI change?

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    N
    @SimonSchroeder Interesting, ill admit I don't full understand what your code is doing, I was more looking for a way to detect DPI changes without using a timer/movement based approach , only doing work when it needs doing, so now I do something like this QObject::connect(qApp->primaryScreen(), &QScreen::logicalDotsPerInchChanged, [this](qreal screen_geometry) { qDebug() << "logical DPI changed:" << QWidget::window()->screen()->devicePixelRatio(); // Such as when I change OS DPI settings , like you mention }); QObject::connect(QWidget::window()->windowHandle(), &QWindow::screenChanged, [this](QScreen* screen) { qDebug() << "Screen changed:" << QWidget::window()->screen()->devicePixelRatio(); // Such as when I drag over to a different monitor }); I then call some handler if need be to tell it to use this new DPI which works perfectly. I'm only using this DPI to recalculate some orthogonal matrices and viewports Edit: If I understand right, you are updating the ratio yourself based on the windows current screen and the primary screen? Won't that impact the pixel ratio (through OS settings) if you modify the primary screen but not the screen its currently on? Directly using QScreen::devicePixelRatio works for me and is clean, sounds like slightly different use cases :)
  • Can't get values from QList in QML

    Solved
    9
    0 Votes
    9 Posts
    700 Views
    Atr0p0sA
    @J-Hilk Got it. Thanks again and have a great day :)
  • QSerialPortInfo - automatic updates

    Unsolved
    3
    0 Votes
    3 Posts
    362 Views
    Kent-DorfmanK
    @Dummie1138 For the request, as you've outlined it, the QTimer approach should work, as long as Qt doesn't cache the QSerialPortInfo::availablePorts() data. The OS hardware add/delete notify isn't really exposed to the Qt programmer because it differs based on the platform. In Linux inotify from kernel tells the udev daemon about hardware changes. I just spent a whole day fighting with udev rules so this is fresh in my mind.
  • Small resolutions problem

    Unsolved
    9
    0 Votes
    9 Posts
    852 Views
    JoeCFDJ
    @rezor I guess you set QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); on high resolutions Did you set it back QGuiApplication::setAttribute(Qt::AA_DisableHighDpiScaling); on lower resolutions ?
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    37 Views
  • Change color of an inputed text in a QListWidget

    Solved
    5
    0 Votes
    5 Posts
    549 Views
    D
    @SGaist Thankyou I got it to work now [image: 7e88354e-e287-444f-b61f-3786764262df.png]
  • QTableWidget and QStyledItemDelegate

    Unsolved
    5
    0 Votes
    5 Posts
    456 Views
    JoeCFDJ
    @Perdrix If you have logging code, use it to find out where these messages come out. Or use the debugger of qtcreator to go through your code