Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Install qt 5.15.1 in my system

    Unsolved
    6
    0 Votes
    6 Posts
    591 Views
    B
    See http://download.qt.io/official_releases/qt/5.15/5.15.1/OFFLINE_REAMDE.txt Due to The Qt Company offering changes, open source offline installers are not available any more since Qt 5.15. Read more about offering changes in the https://www.qt.io/blog/qt-offering-changes-2020 blog. If you need offline installers, please consider our new Qt for Small Business offering: https://www.qt.io/blog/available-now-qt-for-small-businesses
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    15 Views
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Why can't QString built from a QJsonDocument be set in a Q_PROPERTY?

    Unsolved
    15
    0 Votes
    15 Posts
    762 Views
    K
    @Christian-Ehrlicher Awesome, thanks! I assumed the designer was updated in the backend magically for Q_PROPERTY values haha. I'll try it out when I get home later today. Yah it was difficult to find documentation, because I was searching for guides using the wrong word... but then I started typing "Qt Custom Widget Property Extension" and that turned up the correct results :).
  • OSX clang link error

    Solved
    3
    0 Votes
    3 Posts
    539 Views
    SGaistS
    Hi and welcome to devnet, Usually the include path of macOS headers is a good tip to what framework the header belongs to.
  • Question about signals

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    JonBJ
    @Inzinejkr said in Question about signals: @Christian-Ehrlicher said in Question about signals: use QObject::sender() and try to cast it to a QCheckBox I just get QCheckBox(0x1f8e510)? He wants you to go: QCheckBox *checkbox = qobject_cast<QCheckBox *>(QObject::sender()); if (checkbox != nullptr) { if (checkbox->checked()) saveText(checkbox->text()); } Read up qobject_cast<>().
  • Project using Botan fails to compile, with hundreds of errors.

    Solved
    4
    0 Votes
    4 Posts
    398 Views
    swirlS
    Nevermind, fixed it. Turns out I was missing a Botan file and reinstalling the package fixed it Edit: forgot to mention this, but I had a file called "string.h", and qmake added the project directory as an include path, which added to some of those errors. Renaming it also fixed it.
  • How to permanantly change .pro settings

    Solved
    4
    0 Votes
    4 Posts
    433 Views
    JonBJ
    Now that this question/thread is solved, I feel like saying: until I read this this I had no idea that my (recently-created) Qt project was compiling with C++ 11 rather than a later one.... It would be a different thread if I were now to dare ask what I am missing out on. Because glancing through the changes I see a progression to yet more esoteric/complex constructs. But I have learned that if I move all the way up I should be able to write essentially all my code with auto and not have a clue what types anything are... :D And to think I finally managed to move off Python and back to C++, partly because I was fed up with Python's lack of source code explicit typing.
  • Use QSqlQueryModel with Qt Remote Objects module

    Unsolved
    1
    0 Votes
    1 Posts
    121 Views
    No one has replied
  • geocode() form QGeoCodingManager class not returning anything after passing an address.

    Unsolved
    8
    0 Votes
    8 Posts
    880 Views
    C
    @jsulm Sorry about that, will make sure to change that next time. I know it never enters either one of handleError() or handleFinish() because in my QML i have, Component.onCompleted: { MapFunctions.getmyaddress(); console.log("Coordinate:", MapFunctions.getlatitude()); console.log("Coordinate:", MapFunctions.getlongitude()); } for the application window. If I set values in those handle() functions they do not get reflected in the console log. For example I set longitude= 14 in handleFinish() and I comment out the other code and this has no effect on the output. For handleError() the values do not get set to -1 so it doesn't get called.
  • qInstallMessageHandler() add object method. How?

    Solved
    4
    0 Votes
    4 Posts
    984 Views
    JonBJ
    @bogong Having glanced through that, I see it goes qInstallMessageHandler(ALogger::mWriteToLog); Which is a static function, exactly what you said you did not want! Note that it does not go qInstallMessageHandler(oLogger->mWriteToLog);
  • Insert Column into Excel Spreadsheet

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    VRoninV
    QXlsx doesn't even know about formulae. It does, it just doesn't calculate them The problem is not the insertion itself but it's updating the formulas after an insertion. You'd probably need to insert an engine that can at least read the formulas before even attempting at updating them. This was the stopper in implementing the functionality in the library
  • The program has unexpectedly finished.

    Solved
    8
    0 Votes
    8 Posts
    897 Views
    JonBJ
    @J-Hilk Ooohhh :) That's interesting, didn't know. I compile with -Wall but it doesn't seem to get included in that. https://stackoverflow.com/a/57079021/489865 is interesting in explaining various "shadow levels". Of course, as soon as I actually used it I'd probably moan about the perfectly intentional places I find convenient to have a same-named variable and don't want to be warned... :)
  • 0 Votes
    22 Posts
    15k Views
    8Observer88
    @8Observer8 said in QOpenGLFunctions glGetString(GL_EXTENSIONS) is null: I have a same question. I try to show OpenGL version but I get empty string: I solved the problem. I activated a second video card on my laptop from code in main.cpp: #ifdef _WIN32 #include <windows.h> extern "C" __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; extern "C" __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001; #endif #include "Widget.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); Widget w; w.show(); return a.exec(); } It works too (without QString::fromLatin1): qDebug() << (const char*)glGetString(GL_VERSION);
  • How to declare global variable in QT?

    Solved
    13
    0 Votes
    13 Posts
    4k Views
    T
    @jsulm Yes, but here I see that cout is object of std::sotream class.
  • Custom QEvent question

    Unsolved
    7
    0 Votes
    7 Posts
    624 Views
    Christian EhrlicherC
    @krm26 said in Custom QEvent question: Guess I'll source-dive the answer, thanks. Not needed and I don't think you're right except somehwere else the event is already accepted: https://code.woboq.org/qt5/qtbase/src/corelib/kernel/qobject.cpp.html#1298 I would guess you simply forget to call the base class event() function when you've overwritten it.
  • Menu bar shows "QtWebEngineCore" instead of program name in MacOS menu bar

    Unsolved
    1
    0 Votes
    1 Posts
    104 Views
    No one has replied
  • QGraphicsPixmapItem is not correctly updated when the pixmap is big.

    Unsolved
    1
    0 Votes
    1 Posts
    153 Views
    No one has replied
  • Copy all screen

    Unsolved
    2
    0 Votes
    2 Posts
    179 Views
    Pl45m4P
    @leandrogmuller Access all your labels and simply get their text?! You want to use your label variables not get, what is written on your screen programmatically. To do that, you could iterate through your layout (if it only contains your labels) and get all the text.
  • 0 Votes
    7 Posts
    496 Views
    Christian EhrlicherC
    @devjb said in Help fixing threading issues when running an application in (debug|release) mode in combination with shared libraries built vice versa: However, you say it was not allowed to ship libs that are build with MSVC in debug mode. Then, just for my understanding, why can Qt do so with the framework? In the MSVC directory there are all the Qt5 libraries both as release and debug versions. This is wrong - maybe we were not clear. You are not allowed (by MS) to distributed to debug MSVC runtime dlls (msvcrtdXXX.dll and others) :)