Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Problems with QNetwork | QNetworkAccessManager

    Solved
    34
    0 Votes
    34 Posts
    4k Views
    SGaistS
    No, do it once in the constructor. The setting will apply to all future requests.
  • QScrollArea not expanding when QPixmap is loaded

    Unsolved qscrollarea qpixmap qlabel
    3
    0 Votes
    3 Posts
    815 Views
    SGaistS
    Hi, How did you set the QLabel on your QScrollArea ? If you put it in a layout on the scroll area then that's wrong.
  • shitty question

    Unsolved
    5
    -1 Votes
    5 Posts
    450 Views
    SGaistS
    @aaaaaaaaaaaaaaaa said in shitty question: @koahnig i don't need vs2019 on my computer to use the msvc compiler on Qt ? No, the C++ build tools are enough. Please, update your thread title to something meaningful.
  • How to create Q_PROPERTY 'alias' in C++.

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    L
    Finally came back to this problem (testers wouldn't stop bugging me about it). Found a potential solution! QQmlProperty::write(QObject*, const QString& name) It doesn't seem to be documented, but calling this function seems to break any existing QML bindings on the specified property. So I just create a separate WRITE function for my aliased property: Q_PROPERTY(int number READ GetNumber WRITE SetNumber NOTIFY NumberChanged) Q_PROPERTY(int numeral READ GetNumber WRITE OverwriteNumber NOTIFY NumberChanged) void OverwriteNumber(const int value) { QQmlProperty p(this, "number"); p.write(value); } Seems to work for me. Basically gets around the problem of C++ being unaware of the binding by writing to the property through the QML context, I guess. It's probably much slower than calling the setter directly, so probably not ideal for properties that change frequently, but it will suffice for my purposes.
  • Qt 5.12.7 - QWebEngine Could Not load plugin

    Unsolved
    1
    0 Votes
    1 Posts
    232 Views
    No one has replied
  • Is there a way to get the horizonal advance of every character in a string?

    Solved font size
    6
    0 Votes
    6 Posts
    639 Views
    G
    Actually, 100% my fault. Things are plenty fast. I had an extra call to size() in my method that I didn't need, and that is a slow call. Thanks, Gerald
  • Qt Designer cannot set QTableWidget header column narrow

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    mrjjM
    @JonB Haha. Perfect answer if any user asks :)
  • Qt Quick Tutorial Help please

    Unsolved
    4
    0 Votes
    4 Posts
    256 Views
    mrjjM
    @Garf Please do as that book is actually the best we got so far and I never found any other book that was better. Also as soon as you start to make a real biz application where animation and interface is less important than the actual data processing, you will find that https://doc.qt.io/qt-5/qtqml-cppintegration-overview.html https://doc.qt.io/qt-5/qtqml-cppintegration-topic.html becomes the reference and a tutorial with a more beginner friendly learning curve would be golden. (IMHO)
  • QTextStream can't separate lines by '\n' char

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    Please_Help_me_DP
    @mrjj yes, thank you I've just found a way to show end of file character in notepad :)
  • 0 Votes
    9 Posts
    2k Views
    mrjjM
    Hi You are most welcome. Thank you for sharing the solution as the use case might be pretty common and it is indeed not optimal having to scroll all the way to the bottom to be able to scroll sideways.
  • Qt Style Sheets versus setFont function.

    Solved
    3
    0 Votes
    3 Posts
    282 Views
    C
    @mrjj Thank you so much. This takes some worry off my mind.
  • How to access the parent thread's vriable from child QThread

    Unsolved
    2
    0 Votes
    2 Posts
    622 Views
    jsulmJ
    @Mohammadreza99A Why do you want to access a private variable from another class? Don't do that, use getter/setter. When using threads you would need to synchronise the access to avoid race conditions. Better would be to use signals/slots to exchange data between MyClass and Worker.
  • QString::section() NO bug

    Solved
    10
    0 Votes
    10 Posts
    567 Views
    G
    Finally I have found error in my code. It was hard because of weird processing. QString::split() works fine. But what about QRegExp - I do not remember why I used it instead of QRegularExpression. May be it looked simpler. This code was redesigned and regular expression was much more complex at beginning.
  • How to check if a resource exists?

    Solved
    7
    0 Votes
    7 Posts
    4k Views
    sierdzioS
    Nice! Happy coding
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    29 Views
    No one has replied
  • How to set the current index of a tree view to the selected row?

    Unsolved
    13
    0 Votes
    13 Posts
    2k Views
    SGaistS
    From the looks of it, you only want a copy of the content of the tree item.
  • qmake question

    Unsolved
    2
    0 Votes
    2 Posts
    171 Views
    SGaistS
    Hi, Modify the protobuf_decl.output, protobuf_impl.output and protobuf_impl.depends paths to point to where you want.
  • Excessive memory use in QNetworkAccessManager after network disruption

    Unsolved
    11
    0 Votes
    11 Posts
    822 Views
    N
    After a lot more testing and comparing between systems with and without the issue, is does not seem to be related to network reliability after all. System sending regularly and constantly are OK systems spending sporadically take up ever more memory. When about a 100K is sent every 10-20 minutes and additional 40Mb is used up daily compared to sending ever minute. This memory in not released if QNetworkAccessManager is destroyed. Memory is taken during QnetworkAccessManager::post() and the amount can be anything between 2-300K to 3MB at a time and is not related to the amount of data sent. Does anyone have experience with cacheing in QNetworkAccessManager? What is cached by default and how to control it?
  • 0 Votes
    6 Posts
    1k Views
    K
    I can open this port by: So, as I said, the problem is not in O_LARGEFILE. There are just a few codes in QSP sources in github link This is not a sources, the sources is in.
  • what does the rssi of bluetoothdeviceinfo mean

    Solved
    13
    0 Votes
    13 Posts
    1k Views
    MihanM
    @jsulm Oh, I didn't notice that the example the link said "For example, Manufacturer A could have an RSSI max value of 100 while Manufacturer B will return RSSI values anywhere from 0 to 127. " So,maybe rssi() == 127 means this signal is the best. Thank you so much!