Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • QtCreator. CUDA. Make final linking with NVCC

    Solved
    18
    0 Votes
    18 Posts
    7k Views
    T
    @Gerd Thank you for these build instructions! Though I only found this post AFTER figuring out the problem. My CUDA code stopped working after upgrading Qt and some other libraries. I was getting invalid symbol and invalid texture errors at runtime, not linking errors. So it took days to track this down. How did you find this? #since qt5.9 they use /Zc:rvalueCast- /Zc:inline- in the msvc-mkspecs # we have to switch that off!! # else linking __device__ __managed__ vars wont work correctly (in release mode only) QMAKE_CUFLAGS = $$replace(QMAKE_CUFLAGS, -Zc:inline, ) Do you think it makes sense to report this change as a bug in qmake? It's easy to work around and I doubt they'd revert it, but it's a frustrating invisible change that breaks things. Here is the change that broke it: https://code.qt.io/cgit/qt/qtbase.git/commit/mkspecs/common/msvc-version.conf?h=5.9&id=255d291efd5ed3e193a6340055c35887f687f0ca To fix the problem and make the build consistent between Qt 5.8 and newer, I added this to my general configuration: equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 9):*msvc* { QMAKE_CXXFLAGS += -Zc:rvalueCast QMAKE_CXXFLAGS += -Zc:referenceBinding # Need to unset this for CUDA code QMAKE_CXXFLAGS += -Zc:inline } and this to just the library that uses CUDA: *msvc* { # Fix symbols and textures removed from library # https://forum.qt.io/post/584959 QMAKE_CXXFLAGS -= -Zc:inline QMAKE_CXXFLAGS += -Zc:inline- }
  • QPropertyAnimation, partially works.

    Solved
    5
    0 Votes
    5 Posts
    435 Views
    lincolnL
    great, fix my little problem, thanks.
  • Button Status Updation on UDP packet reception

    Unsolved
    17
    0 Votes
    17 Posts
    1k Views
    R
    thanks for spending your valuable time. let me try to sort it out.
  • Crash in QGuiApplication::font but..

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    J
    After some quick testing, looks like "--platform offscreen" did the trick. Many thanks!
  • How to check whether a font is the requested font

    Solved
    3
    0 Votes
    3 Posts
    1k Views
    J
    I logged this: https://bugreports.qt.io/browse/QTBUG-87267 Looks like it was a bug. I haven't confirmed whether or not it has been fixed, but there's a commit to 5.15 branch. I'll mark this topic solved.
  • Qt Frameworks issues with MacOS notarization

    Solved macos framework
    15
    0 Votes
    15 Posts
    4k Views
    SprezzaturaS
    We had a similar problem. There does not appear to be any purpose for a lot of the stuff that Qt Creator piles into the ".app" file, and it interferes with Apple Notarization. We solved the problem by simply creating a command file that deletes the conflicting files: # Clean out detritus that prevents notarization cd foo.app find . -name "*.h" -delete find . -name "*.prl" -delete find . -name "*.cstemp" -delete find . -name "Headers" -delete find ./ -name "*_debug" -delete
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    25 Posts
    7k Views
    KH-219DesignK
    @SpaceToon said in Unknown Exception is not beeing caught in trycatch-Block (Bluetooth Low Energy, ServiceDetailsDiscovery): @KH-219Design : Thank you very much for your suggestion, for using the lowenergy example from Qt. I did this and the same error occurs there! For this reason, I copied the following code from there and paste it in my .cpp file @SpaceToon I'm truly happy to hear you are able to make forward progress on this! This year marks the first year that I have ventured into BLE using Qt, and I have hit some minor hiccups myself. That is why your post caught my attention in the first place. However, I am working on Android and you are on Windows, which have very different backend/underlying BLE system stacks. So based on the difference in operating systems, I was doubtful if anything I learned would really translate directly here. Your watershed moment about QLowEnergyController::Error prompted me to go look at my code again to see what I am doing in case of QLowEnergyController::Error. I noticed that in my slot I have this comment: // The Qt API for QLowEnergyController has some confusing // overlap/ambiguity. When we get "ConnectionError" I would EXPECT that // the signal QLowEnergyController::disconnected would also be // forthcoming. But it seems (by observation) that this is not how it // works. So we have to treat BOTH the disconnected signal and the // error signal as signs of a disconnection. ... so maybe you and I did actually run into a very similar pitfall after all! It would be great to know if there is some null-reference bug in Qt BLE itself, but neither you nor I may have time to investigate that further. Since we both seem to have worked around our respective pain points, may we carry on and each deliver a successful project! You also asked: Did you compile Qt for debug, and can the debugger see/know the location of the corresponding Qt source files? Which is a very useful tactic, which I have done many times on Linux Qt. I just read some of this: https://stackoverflow.com/questions/5571098/how-can-i-make-msvc-debugger-step-into-qt-library-source-code-again/5576414 Which refers to compiling the QtCored5.dll DLL(s) for oneself. (This is essentially analogous to how I do it on Linux, but building Qt from source is usually several hours of effort on the first time... and I'm not talking about the additional potential hours of just letting the compiler run!) Maybe someone else in this thread has had personal experience with debugging into Qt source files on Microsoft Windows. Or maybe that could be a new thread!
  • cross-compiling on Ubuntu to rpi B+ raspbian stretch

    Solved
    13
    0 Votes
    13 Posts
    3k Views
    B
    @flemingp Sorry for bumping, but I have exactly the same problem - I'm trying to cross-compile qt5 for raspberry pi and encounter error io/qfilesystemengine_unix.cpp: In function ‘int qt_statx(const char*, statx*)’: io/qfilesystemengine_unix.cpp:321:26: error: ‘AT_FDCWD’ was not declared in this scope 321 | return qt_real_statx(AT_FDCWD, pathname, 0, statxBuffer); | ^~~~~~~~ io/qfilesystemengine_unix.cpp: In function ‘int qt_lstatx(const char*, statx*)’: io/qfilesystemengine_unix.cpp:326:26: error: ‘AT_FDCWD’ was not declared in this scope 326 | return qt_real_statx(AT_FDCWD, pathname, AT_SYMLINK_NOFOLLOW, statxBuffer); | ^~~~~~~~ io/qfilesystemengine_unix.cpp:326:46: error: ‘AT_SYMLINK_NOFOLLOW’ was not declared in this scope 326 | return qt_real_statx(AT_FDCWD, pathname, AT_SYMLINK_NOFOLLOW, statxBuffer); | ^~~~~~~~~~~~~~~~~~~ io/qfilesystemengine_unix.cpp: In function ‘int qt_fstatx(int, statx*)’: io/qfilesystemengine_unix.cpp:331:34: error: ‘AT_EMPTY_PATH’ was not declared in this scope 331 | return qt_real_statx(fd, "", AT_EMPTY_PATH, statxBuffer); | ^~~~~~~~~~~~~ io/qfilesystemengine_unix.cpp: In static member function ‘static bool QFileSystemEngine::renameFile(const QFileSystemEntry&, const QFileSystemEntry&, QSystemError&)’: io/qfilesystemengine_unix.cpp:1447:19: error: ‘AT_FDCWD’ was not declared in this scope 1447 | if (renameat2(AT_FDCWD, srcPath, AT_FDCWD, tgtPath, RENAME_NOREPLACE) == 0) | ^~~~~~~~ However, I don't understand your soultion. My configure script is: ./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf- -sysroot /mnt/linux_hdd/sysroot -opensource -confirm-license -I/mnt/linux_hdd/sysroot/usr/include/ -L/mnt/linux_hdd/sysroot/usr/lib/arm-linux-gnueabihf -skip qtserialbus -skip qtscxml -skip qtscript -skip qtcharts -skip qt3d -skip qtdatavis3d -skip qtcanvas3d -skip qtgamepad -skip qtvirtualkeyboard -skip qtwayland -skip qtwebengine -skip qtwebchannel -skip qtwebglplugin -skip qtwebsockets -make libs -prefix /usr/local/qt5pi -extprefix /mnt/linux_hdd/qt_rasp/qt5pi -hostprefix /mnt/linux_hdd/qt_rasp/qt5 -no-use-gold-linker -v -no-gbm You said that after running configure you ran ~/raspi/qt5/bin/qmake -query Yeah... except there's nothing inside my hostprefix directory. /mnt/linux_hdd/qt_rasp is empty. I've found the qmake binary inside qt-everywhere-src-5.15.1/qtbase/bin. I've also added INCLUDEPATH+=/mnt/linux_hdd/sysroot/usr/include/ LIBS +=-L/mnt/linux_hdd/sysroot/usr/lib/arm-linux-gnueabihf to qtbase/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf. No difference. Compilation still fails with the same error. I'm really losing my mind because I can't find a solution. Would be really thankful for any suggestions
  • How can I do mouse click event on graph using QChartView?

    Unsolved
    4
    0 Votes
    4 Posts
    3k Views
    Pl45m4P
    @sys1 Why not? What is happening? How did you implement it? https://doc.qt.io/qt-5/qchartview.html#mousePressEvent
  • how to duplicate widget

    Solved
    18
    0 Votes
    18 Posts
    21k Views
    JonBJ
    @Ayush92 For anyone reading this/tempted to answer, please note that the OP is asking the same question in https://forum.qt.io/topic/119689/gui-from-xml-in-c [where I have tried to answer]. We don't want to keep answering the same issues in multiple threads....
  • no connect lybraries in Qt Creator

    Unsolved
    1
    0 Votes
    1 Posts
    121 Views
    No one has replied
  • 0 Votes
    3 Posts
    677 Views
    B
    Thank you very much for your reply! Will take a look at your link.
  • QNetworkAccessManager doesn't post request in case of large file

    Unsolved
    26
    0 Votes
    26 Posts
    4k Views
    R
    @KroMignon I uploaded the new server code in the same zip
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • QStringlist missing methods

    Unsolved
    4
    0 Votes
    4 Posts
    439 Views
    GerhardG
    look at this: https://ubuntuforums.org/showthread.php?t=1703963
  • QListWidget update issue

    Solved
    7
    0 Votes
    7 Posts
    645 Views
    JonBJ
    @tsdk I don't know how you managed to achieve "visualization" [for the end user] without a QTimer. Sorting steps will complete so quickly that I can't believe the user will see it "animated" in progress, which I thought is what you wanted. But you seem to be happy :)
  • This topic is deleted!

    Unsolved
    8
    0 Votes
    8 Posts
    107 Views
  • Select a tab of a QTabWidget with mouseClick()

    2
    0 Votes
    2 Posts
    894 Views
    S
    Have you solved this Question?
  • lexical and preprocessor issue on c++

    Unsolved
    13
    0 Votes
    13 Posts
    3k Views
    jsulmJ
    @alex_890 Please show the Kits tab