Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • progress bar

    Unsolved
    6
    0 Votes
    6 Posts
    357 Views
    sierdzioS
    @Rockerz you can use the chunk property for this in the stylesheet, but it won't allow you to show different size of the bar I think: https://doc.qt.io/qt-6/stylesheet-reference.html#chunk-sub
  • QNetworkAccessManager fails while curl work

    Solved
    5
    0 Votes
    5 Posts
    483 Views
    P
    Thanks for the tips and @hskoglund , the crul --lib option is a really cool trick I will never forget. And @SGaist, thanks for the checklist, I'll keep it in mind. 30 years of C++, quite some time with C-level sockets and newbie on modern networking in Qt I need all help I can get. I found the problem and it is a typo. I rearranged the code and the URL-port is set after I have used the object to initiate the network request. I shifted the lines and things are working as supposed. I figure I just needed some time away from the code to actually READ the code ;)
  • Help docunentation for QtCreator

    Unsolved
    1
    0 Votes
    1 Posts
    116 Views
    No one has replied
  • QImage::fromData SEGV

    Unsolved
    17
    0 Votes
    17 Posts
    1k Views
    C
    I still didn't find a solution to this, does anyone have another idea?
  • Call to temporary is a no-op

    Solved qlineseries qchart qchartview
    4
    0 Votes
    4 Posts
    1k Views
    W
    @wasawi2 wooops sorry my newby fault!! I just had to remove the auto in the cpp file. Therefore: linewidget.cpp //![1] m_series = new QLineSeries; //![1] linewidget.h QLineSeries* m_series = nullptr; Everything under control now. Thanks again for your fast answer @kkoehne.
  • FAILED: when Qt build from source on Windows 11

    Unsolved
    3
    0 Votes
    3 Posts
    549 Views
    N
    Hello Sierdzio and All! I didn't get the source code from the package. I used the command. git clone git://code.qt.io/qt/qt5.git qt6 perl init-repository I don't need QtWebEngine by itself, but I want to try to do something on WebAssembler, and for it I need Qt WebEngine. I know about the ready-made installer, but it's more interesting to assemble it yourself. In addition, I tried to fix the source code of the Qt library itself. With best regards, Navadvipa Chandra das.
  • Reconnect to remote MySQL ODBC database when host returns online

    Unsolved
    1
    0 Votes
    1 Posts
    204 Views
    No one has replied
  • Signal handling with uninitialized receiver

    Locked Solved
    6
    0 Votes
    6 Posts
    509 Views
    D
    @jsulm said in Signal handling with uninitialized receiver: ClassFoo then emits a signal. Meaning Qt signal, are you? Only instances of classes are capable of receiving Qt signals. In order to connect the sender and receiver, there must be a ClassReceiver instance someplace and a connect(...) method. Look for this in the source code. It doesn't matter if there are no receivers connected; signals can still be sent.
  • How to build static Qt 6.4 for Windows?

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    sierdzioS
    Here is a configure line I'm using to build Qt 6.4.3 statically on Windows (and please remember to respect the license! Static builds usually mean commercial license of Qt!): ..\qt-everywhere-src-6.4.3\configure.bat -static -static-runtime -plugin-manifests -no-openssl -schannel -c++std c++20 -dbus-runtime -confirm-license -release -nomake examples -nomake tests -prefix ..\6.4.3 -no-icu -no-glib -qt-doubleconversion -qt-pcre -qt-zlib -qt-freetype -qt-harfbuzz -qt-libpng -qt-libjpeg -qt-sqlite -qt-tiff -qt-webp -skip qtcoap -skip qtopcua -skip qtscxml -skip qtwebengine -skip qt3d -skip qtconnectivity -skip qtlanguageserver -skip qtpositioning -skip qtsensors -skip qt5compat -skip qtdatavis3d -skip qtlottie -skip qtquick3d -skip qtserialbus -skip qtwebview -skip qtactiveqt -skip qtquick3dphysics -skip qtserialport -skip qtquicktimeline -skip qtwayland -skip qtcharts -skip qthttpserver -skip qtremoteobjects -skip qtspeech -skip qtwebchannel -skip qtmultimedia cmake --build . --parallel cmake --install . Mind you, I am using MSVC to build, I am not sure if the same will work for MinGW.
  • how to include QDebug to my project?

    Solved
    5
    0 Votes
    5 Posts
    399 Views
    SGaistS
    @JacobNovitsky said in how to include QDebug to my project?: CONFIG -= qt QT += qapplication Nuke these two lines.
  • Focusing away from Qt app on Mac

    Unsolved
    2
    0 Votes
    2 Posts
    178 Views
    SGaistS
    Hi, One starting point you can use is this stack overflow answer which uses NSWorkspace.
  • 0 Votes
    4 Posts
    690 Views
    SGaistS
    Then why don't you resize the widget item created to fit the view ?
  • How to make my program work for older versions of macOS?

    Solved
    14
    0 Votes
    14 Posts
    2k Views
    CiproC
    @SGaist Hi, thank you. You're right. So, for example, with Qt 6.4 I can't go beyond macOS 10.14.
  • QPrinter reporting (false positive?) memory leaks

    Unsolved
    1
    0 Votes
    1 Posts
    140 Views
    No one has replied
  • image's parent is being passed to child widget..

    Solved
    4
    0 Votes
    4 Posts
    295 Views
    1
    @Chris-Kawa thanks, that is even more elegant!! Just was wondering my solution is bad, because, what happens if i had more than one QFrame?.. or more than one button?.. the style will be changed for all of them... but identifying as you said then that problem will gone..
  • Any bar charts for my application? (details description included)

    Unsolved
    1
    0 Votes
    1 Posts
    109 Views
    No one has replied
  • Does Range-Based For on Qt Container Do a Deep Copy?

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    C
    TLDR for googlers thx to Chris Kawa & JHilk: QVector<QString> awesomeVector; for (QString& string : awesomeVector) // deep copy if container is shared & reference count greater than 1, otherwise no deep copy const QVector<QString> awesomeVector; for (const QString& string : awesomeVector) // no deep copy QVector<QString> awesomeVector; for (const QString& string : qAsConst(awesomeVector)) // no deep copy
  • Visual Studio doesn't find Qt static source for debug mode

    Unsolved
    3
    0 Votes
    3 Posts
    351 Views
    Chris KawaC
    @Cesar Since you're using -debug-and-release both configurations are built, but you need to install them separately, so after you build do cmake --install . cmake --install . --config Debug the first one installs the Release config and the other one Debug. With that you shouldn't add two versions in the VS tools dialog. It's the same build and you switch between them with the configuration switch combo box.
  • layout set and widget as parent...

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    Christian EhrlicherC
    @1XU7 said in layout set and widget as parent...: i tought by setting wdg as parent to button, and wdg has lay as layout, the layout would add button automatically... No and I don't see any evidence that a QObject-based parent-child relationship should have something to do with a layout. The other way round is correct - when you add a widget to another widgets layout then the other widget is becoming the parent of the child because otherwise parent-child stuff like e.g. event propagation would not work. So no, no need to set a parent in your code but it will also not hurt and makes it more obvious what you're trying to do.
  • QSQL return multiple rows on a single fetch

    Unsolved
    3
    0 Votes
    3 Posts
    232 Views
    SGaistS
    Hi, You can use the LIMIT clause in your query depending on what you want to achieve. It can help for doing paging.