Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • 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
    120 Views
    No one has replied
  • 0 Votes
    3 Posts
    673 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
  • Project ERROR:License check failed! Giving up ...

    7
    0 Votes
    7 Posts
    3k Views
    jsulmJ
    @markwang said in Project ERROR:License check failed! Giving up ...: I've downloaded all the options. 50G + .... Why?! You only need Qt 5.15.1 for MinGW + MinGW...
  • Access to other class variables

    Unsolved
    9
    0 Votes
    9 Posts
    427 Views
    Christian EhrlicherC
    @Pl45m4 Thx, fixed :)
  • Switching back from code to Qt Designer in PyQT

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    Kent-DorfmanK
    As stated above, if you are using designer correctly (and to a larger extend OOP) then you can make your changes in designer and update the class that you use to encapsulate the interface in. You should be either subclassing the generated UI class or instantiating it and using ui.setupUi(self) in another qwidget derived class.
  • Trapping QT debugging messages

    Unsolved
    7
    0 Votes
    7 Posts
    588 Views
    JonBJ
    @drmhkelley You can't know for sure, unless you write perfect code in the first place. Depends on the code and what the messages are. Find the message text, track it down.
  • Killing QThread inside of object. How?

    Solved
    8
    0 Votes
    8 Posts
    589 Views
    Chris KawaC
    @bogong I'm a slow typer I guess :) Good for you.
  • How to play Gif with QToolTip

    Unsolved
    4
    0 Votes
    4 Posts
    819 Views
    Christian EhrlicherC
    @magicstar said in How to play Gif with QToolTip: How to use QMovie with QToolTip? You can't. You have to do it on your own with window flag Qt::Tool
  • Dialog UI doesn't show up if it's pointer is allocated inside a function.

    Solved
    6
    0 Votes
    6 Posts
    440 Views
    Chris KawaC
    So the main window is blocked. Hold on a sec. Lets be clear here. Local event loop started by exec() does not block event processing in main window or any other parts of your app. Main window can't get focus, but that's because you set your dialog to be modal, not because of a local event loop. All events are processed as usual, no matter how deep on an event loop stack you are. It's just that you don't leave the scope the loop is running in. The way I see this is that if for example I would like to open 2 or more dialogs at the same time, I should find another way to show them by not blocking the main loop. Just use show() in that case, like you did. Just don't use a smart pointer on it so it doesn't delete your instances when you leave the scope. I guess if I want to use the app in this way, I should just declare the pointer to ConvertDialog as member variable and get done with it. If you need to have some sort of access to your dialog when it's shown then that's one way to do it, but if it's a standalone thing you don't need to keep any pointer to it. You can use the Qt::WA_DeleteOnClose attribute I mentioned so it deletes itself when it's closed or you can manually call deleteLater() in its close event handler. I mean how bloated can we allow a class to become? There's simply no one answer to that. From technical standpoint you can stuff your class as much as fits in the memory. A pointer or two is not a lot when you think how much RAM a random computer has. You could have no classes at all for all CPU cares. It's all just bytes and addresses to it anyway. The other consideration though is readability and maintainability of your code. Smaller classes compose better and are easier to understand, refactor and maintain. Things like dialogs or message boxes are temporary in nature so it's a bit silly to keep a pointer to one around when most of the time it's null, but sometimes it's just the most convenient thing to do. All in all it's the beautiful dance of balancing those different concerns we programmers deal with every day :)
  • Console window is gone

    Solved
    3
    0 Votes
    3 Posts
    287 Views
    X
    @mrjj Ohhhh yes! Thank you man!!! Now console window opens! Thank you!