Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • external library

    Solved
    4
    0 Votes
    4 Posts
    351 Views
    D
    Ok I found the problem. It turns out that there is a library libmodbus-5.dl.a which is strangely located in the /bin directory . So I added this directory /bin in the PATH, and now it works fine. Thank you very much for your help SGaist !
  • Adding exclusive HTML to my program using QLabel

    Unsolved
    2
    0 Votes
    2 Posts
    156 Views
    SGaistS
    Hi, AFAIK, no. QLabel is not a full web browser with support for html5. If you need a carousel, either implement the image change yourself, use QML or if you really need html, use QtWebEngine.
  • converting QList<QUuid> to QJsonArray

    Solved
    3
    0 Votes
    3 Posts
    457 Views
    mzimmersM
    @Paul-Colby oh, of course...this is what happens when I work too late at night -- I make silly mistakes. Thanks for the help.
  • How properly connect two widgets between two windows

    Unsolved
    2
    0 Votes
    2 Posts
    283 Views
    JonBJ
    @pachisuro4096 said in How properly connect two widgets between two windows: I want trigger some slot of MyLabel by clicking buttons in SettingDialog. There are many things to say and many possibilities for your question. But I pick this out. Why do you want to trigger widget slots from some other dialog anyway? If this is such an issue. think about exporting the required functionality as a public method of its own. I will also just comment that inspecting Qt source code there are indeed examples where they spell out "redirecting" each signal of an object into another signal. If widgets are so "private" to each other I am "surprised" external objects want to access them. The idea of private is that external things just don't need to do that. Else maybe they (or rather accessors) need exposing. One last: depending on your requirements, you might be interested in QSignalMapper Class as an approach to reducing the number of distinct signals to deal with.
  • How to set QComboBox item data from QtDesigner

    Unsolved
    9
    0 Votes
    9 Posts
    2k Views
    JonBJ
    @Mark81 said in How to set QComboBox item data from QtDesigner: they could be add just the most common types: QString, int, double, etc... Well, they don't offer that... :) If I were in a situation where I really wanted to add data field at design-time so I could do it in one place associated with where I did text, and if I wanted to add strings (or maybe numbers) for the data. I would do something like: put # followed by data value after text in Designer. Like Off#0 or This is long text#long. And then at UI setup time walk my combo's text items and separate them out to reset text and the data on the #. Yes it's ugly, but I might if I wanted the data specified at design-time.
  • Subscription message not being received in Qt

    Solved
    10
    0 Votes
    10 Posts
    683 Views
    SGaistS
    Nice ! Glad you found out and thanks for sharing :-) Don't forget to mark the thread as solved :-)
  • 0 Votes
    4 Posts
    286 Views
    gfxxG
    There are really link problem ... discover it and solve the issue.
  • Struggling with mouse events

    Solved
    3
    0 Votes
    3 Posts
    564 Views
    S
    @Pl45m4 said in Struggling with mouse events: QGraphicsView subclass Installing the filter on the scene works perfectly. Thanks!
  • How do I add a statusbar widget to a dialog in the ui designer?

    Solved qstatusbar promote
    10
    1 Votes
    10 Posts
    19k Views
    Christian EhrlicherC
    @Mark81 Feel free to provide a patch :)
  • QSlider: show bar from center +/-

    Unsolved
    2
    0 Votes
    2 Posts
    301 Views
    Pl45m4P
    @daniel-barna said in QSlider: show bar from center +/-: How can it be changed so that the blue bar is drawn between the central value (0) and the actual value? slider->setRange(-100, 100); slider->setValue(0); This meets your requirements, but it is probably not what you are looking for... For custom style and behavior, you have to write your own slider widget Edit: You have this: |-----|-----|-----|-----|-----|-----| ^ and want this? |-----|-----|-----|-----|-----|-----|                   ^ the blue bar is drawn from the leftmost corner, i.e. from -100 to the given value You must be on MacOS then, right?! Could be an OS specific thing. I dont know how sliders are natively drawn on macOS but probably the bar starts at the origin. So for your goal you would need to move the origin to the center of your scale and go from there (left for negative values, right for positive).
  • Direct2D QPA

    Unsolved
    1
    0 Votes
    1 Posts
    196 Views
    No one has replied
  • Use autofill suggestions from website

    Solved
    3
    1 Votes
    3 Posts
    615 Views
    S
    @JonB You are great!! Thanks so much, that solved the issue.
  • Change the BLE MTU

    Unsolved
    2
    1 Votes
    2 Posts
    1k Views
    E
    @Mark81 said in Change the BLE MTU: Hi! Is there a way to change the default MTU for a Bluetooth Low Energy GATT server? I have same question. My application is based on HeartRate example, and every time app starts, it tries to configure the MTU to 512, but is not possible and it goes to 23, as you can see bellow. I think the reason is the maximum MTU of my device is 247 (EFR32BG22 Silicon Labs). I don't find a way to change the default value of 512 that the HeartRate example imposes, so I need help. D BluetoothGatt: connect() - device: 50:32:5F:CC:3D:3F, auto: false D BluetoothGatt: registerApp() D BluetoothGatt: registerApp() - UUID=77a9d5a3-9f10-42bb-8156-04653f2468ad W QtBluetoothGatt: Using Android v26 BluetoothDevice.connectGatt() D BluetoothGatt: onClientRegistered() - status=0 clientIf=9 D BluetoothGatt: onClientConnectionState() - status=0 clientIf=9 device=50:32:5F:CC:3D:3F D BluetoothGatt: discoverServices() - device: 50:32:5F:CC:3D:3F D BluetoothGatt: onConnectionUpdated() - Device=50:32:5F:CC:3D:3F interval=6 latency=0 timeout=500 status=0 D BluetoothGatt: onSearchComplete() = Device=50:32:5F:CC:3D:3F Status=0 D BluetoothGatt: configureMTU() - device: 50:32:5F:CC:3D:3F mtu: 512 W QtBluetoothGatt: MTU change initiated D BluetoothGatt: readRssi() - device: 50:32:5F:CC:3D:3F D QtBluetoothGatt: RSSI read initiated D QtBluetoothGatt: RSSI read callback, rssi: -56, status: 0 W QtBluetoothGatt: Late RSSI read reply after timeout was hit D BluetoothGatt: onConfigureMTU() - Device=50:32:5F:CC:3D:3F mtu=23 status=0 W QtBluetoothGatt: MTU changed to 23 W QtBluetoothGatt: Performing queued job, handle: 19 Read (false) ValueKnown: false Skipping: false Characteristic D BluetoothGatt: onConnectionUpdated() - Device=50:32:5F:CC:3D:3F interval=36 latency=0 timeout=500 status=0 W QtBluetoothGatt: Performing queued job, handle: 20 Read (false) ValueKnown: false Skipping: true CharacteristicValue W QtBluetoothGatt: Performing queued job, handle: 21 Read (false) ValueKnown: false Skipping: false Descriptor W QtBluetoothGatt: Finished current discovery for service handle 18
  • QByte Array for 16 Bytes

    Solved
    16
    0 Votes
    16 Posts
    1k Views
    N
    @JonB Thanks Jon, this works well. You're a genius
  • visual studio

    Solved
    2
    0 Votes
    2 Posts
    219 Views
    jsulmJ
    @Rockerz said in visual studio: I tried that windeployqt.exe format it display doesn't exist How did you try to use it? According to documentation (https://doc.qt.io/qt-6/windows-deployment.html) it is in: The tool can be found in QTDIR/bin/windeployqt
  • qt_add_qml_module & LGPL

    Unsolved
    1
    0 Votes
    1 Posts
    124 Views
    No one has replied
  • QMutexLocker with Q_GLOBAL_STATIC

    Solved
    3
    0 Votes
    3 Posts
    317 Views
    beeckscheB
    @jsulm said in QMutexLocker with Q_GLOBAL_STATIC: Why does it have to be global static? Because of ... reasons ... No, you're absolutely right: QMutex mutex; ... void myFun() { QMutexLocker locker(&mutex); } is totally sufficient. (And works by the way). Thanks
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • request about scp command (QProcess) using qt

    Unsolved
    29
    0 Votes
    29 Posts
    6k Views
    JonBJ
    @hlowd So, as I suspected, this shows you are not using QProcess::start() correctly. (It is also not the same as the code you posted in earlier, which was correct at one point.) Which is why I asked you to clarify this. If start("scp", ...) or start("/path/to/scp", ...) run the scp executable, and perhaps produce "usage" output you can capture, it shows that is working. Your other attempts should all indeed fail as you incorrectly try to pass arguments in the string which should be the executable. The example at https://doc.qt.io/qt-6/qprocess.html#running-a-process shows how to do this correctly. If you are on Qt 6.0+ there is a new method, startCommand(), which works the way you tried, if you really want to do it that way.
  • Reliable way to measure QML framerate

    Unsolved
    2
    0 Votes
    2 Posts
    300 Views
    sierdzioS
    @SebastianM QML has a fixed framerate of 60 fps. But if you want to verify, set QSG_INFO env variable and Qt will print frame times to console.