Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Please help me to resolve this error :Cmake error

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    jsulmJ
    @RUXX Just add "--debug-find-pkg=Qt6Bluetooth" parameter to your CMake call...
  • Help to analyze /convert "command string "

    Locked Unsolved
    2
    0 Votes
    2 Posts
    170 Views
    Christian EhrlicherC
    Dupe of https://forum.qt.io/topic/154632
  • Reducing size of captured images.

    6
    0 Votes
    6 Posts
    2k Views
    N
    Hey, you can try adjusting the resolution using the QImage::scaled method after the capture and compress the image data yourself before transferring it to the remote client. This can involve creating a QPixmap, saving it to a compressed file format, and then sending the compressed file over to the client side for reconstruction. On the other hand you can use online application for jpeg image compression such https://jpegcompressor.com/ it also compress image with supporting jpeg, svg, png, webp and etc without losing their quality.
  • QWidget displays 'black window"

    Solved
    5
    0 Votes
    5 Posts
    600 Views
    P
    @ChrisW67 Thanks, that makes sense.
  • In QTableView, how to the text within the cells is always within the visible range.

    Unsolved
    1
    0 Votes
    1 Posts
    108 Views
    No one has replied
  • 0 Votes
    2 Posts
    168 Views
    Chris KawaC
    @Joachim-W It's probably the highlight of the current item. Yes, current item and selection are not the same thing. Try adding QItemSelectionModel::Current to your select call to also change the current item. Also, you don't need to separate clearing and selection, you can just use QItemSelectionModel::ClearAndSelect to do both in one call.
  • Conan, Qt 5.15.9 : can't start deployed Qt app without qt.conf

    Unsolved
    8
    0 Votes
    8 Posts
    905 Views
    D
    @ChrisW67 , I think I understand what is happening : QLibraryInfo::DataPath is not pointing to .\resources thus causing webengine resources load failure. When either Prefix or DataPath is specified in qt.cont, the resource path is updated and resources lookup succeeds. That probably could a bug - either in webdeploy or webengine resources load. Anyway, could you suggest if there is any way to update QLibraryInfo::DataPath in C++ code ? So far I can see that it's only possible via qt.conf. And looks like conan recipe (conanfile.py) has a hard-coded DataPath : args.append("-archdatadir %s" % os.path.join(self.package_folder, "bin", "archdatadir"))
  • USB Communication in qt

    Unsolved
    2
    0 Votes
    2 Posts
    274 Views
    JonBJ
    @Qtcpp_User said in USB Communication in qt: But I need to know when USB data comes.Do Qt have "USB Receive Signal" like Serial Port's? No. As you have found, QIODevices emit readyRead() signal when one or more bytes are received and available to be read. Qt does not have (or at least expose) any special handling for USBs, and probably (can't be sure) does not use this libusb library. Where I should use libusb API libusb_bulk_transfer()? You should not use such a call yourself, assuming you are allowing Qt to handle the serial/USB port. If you want to write your own code for handling USB I/O that is a different matter.
  • Why when i build the project at that time why compiler gives error ?

    Solved
    22
    0 Votes
    22 Posts
    2k Views
    C
    @Qt-embedded-developer I do not understand your second subproject PRO file. It uses TEMPLATE = app and simultaneously CONFIG += staticlib The CONFIG option staticlib means, The target is a static library (lib only). The proper compiler flags will automatically be added to the project. The target is either an application or a library, not both.
  • Keyboard Events

    Unsolved
    5
    0 Votes
    5 Posts
    400 Views
    C
    @PythonShinobi said in Keyboard Events: def keyPressEvent(self, e): if e.key() == Qt.Key_Space: self.onKeyClicked('Space') elif e.key() == Qt.Key_Backspace: print(0) This does something when a space or backspace is pressed and nothing for any other key event received. By default this event handler accepts every QKeyEvent it receives, so no other processing will occur for key strokes.
  • Where to download qt sources

    Unsolved
    4
    0 Votes
    4 Posts
    658 Views
    JoeCFDJ
    @Mesrine if you use online installer, you have the option to install source.
  • Graphics scene crash

    Solved
    7
    0 Votes
    7 Posts
    476 Views
    JonBJ
    @Lyri1014 I assume you mean BaseItem *baseItem = qgraphicsitem_cast<BaseItem*>(item); returned nullptr. You should always check runtime casts, even if just with a Q_ASSERT(). When you have used QGraphics stuff for a while, you may find using darwBackground() for a image scene background is more convenient than creating it as a QGraphicsItem.
  • 0 Votes
    3 Posts
    238 Views
    Q
    @SGaist This Part is learning for me. Because Yes i had not linked it. But when i have linked it Like LIBS += FULLPATH/libComponents.a It works fine. But what to do if we don't want to give full path and want to use another smart way so that i have to not write that full path. LIBS +=$$OUT_PWD/../Components/libComponents.a
  • aasdk library building

    Unsolved
    4
    0 Votes
    4 Posts
    456 Views
    SGaistS
    @manga hi, The first step is to check the documentation of that project to find the information. For example, the first result from a quick search turns this GitHub project and the README gives that information.
  • LNK1181: the input file cannot be opened "release\CameraImageWrapper.obj"

    Solved
    7
    0 Votes
    7 Posts
    484 Views
    xlartasX
    @xlartas I have solved the problem. Just don't use QZXing with 6.3.2MSVC Static build qmake. Use a regular zxing-cpp built using the visual studio dev console. cmake -S zxing-cpp -B zxing-cpp.release -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_CXX_STANDARD=17 -A x64 zxing-cpp.release -> rename -> zxing | and move to project folder Connect the library to the .pro file win32: LIBS += -L$$PWD/zxing/core/Release/ -lZXing INCLUDEPATH += G:/zxing-cpp/core/src DEPENDPATH += G:/zxing-cpp/core/src win32:!win32-g++: PRE_TARGETDEPS += $$PWD/zxing/core/Release/ZXing.lib else:win32-g++: PRE_TARGETDEPS += $$PWD/zxing/core/Release/libZXing.a Make an include. Please note that the order of imports is sometimes important. #include "ReadBarcode.h" #include <ImageView.h> #include <BarcodeFormat.h> ... and others if you need
  • program will not start

    Solved
    15
    0 Votes
    15 Posts
    918 Views
    M
    well, found found out that install offline is different from install online. installed online, clicked configure button, which is not available from off line install, and program starts, and external terminal pop ups. also terminal tab is available [image: b55f2fa7-be9b-4ebf-a0ed-066a7cdfd90a.png]
  • qTextEdit focusOutEvent

    Solved
    2
    0 Votes
    2 Posts
    367 Views
    M
    example::example(QWidget *parent) : QWidget(parent) , ui(new Ui::example) { ui->setupUi(this); connect(qApp, &QApplication::focusChanged, this, [this](QWidget *old, QWidget *now) { if(old==ui->textEdit) { qDebug()<<"textEdit lose focus"; } }); }
  • Translation is not updated by qt5_create_translation

    Unsolved
    1
    0 Votes
    1 Posts
    200 Views
    No one has replied
  • Winsock API problems in QTcpServer

    Unsolved
    2
    1 Votes
    2 Posts
    350 Views
    K
    For reference, there is an old (possibly related) issue on this forum. I checked but it doesn't help.
  • How to import QML plugins?

    Unsolved
    6
    0 Votes
    6 Posts
    633 Views
    JoeCFDJ
    @Roberrt Maybe type the following: how to add static qt qml plugin to app build to chatgpt to see what you get.