Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.1k Posts
  • Networking library

    Unsolved
    8
    0 Votes
    8 Posts
    672 Views
    kshegunovK
    Using 64K combos from 2bytes, with 2 decimal points zero to 640.00+ appears possible. The point is not decimal. 10 bits of fractional gives you 3 decimal digits, meaning that you get 6 more bits for the leading part, which is 64 (in decimal), so 64.xxx is exactly representable. You could "lie" if you can settle to give up a bit from the fractional part: 7 bits leading + 9 bits fractional -> up to 128.xxx with 2.7 decimal digits after the dot (your LSB in decimal would be 0.002 then)
  • QPixmap copying sections, inverted coordinates help.

    Solved
    9
    0 Votes
    9 Posts
    366 Views
    SPlattenS
    Fixed, no longer an issue. QRect rctSection; int intOnscreenSpan((truth::msintViewMax - truth::msintViewMin) * mptPixelsPerBSCAN.y()), intYoffset(truth::msintViewMin * mptPixelsPerBSCAN.y()); intYoffset = intOnscreenSpan + intYoffset; rctSection.setRect(0, rctOffscreen.height() - intYoffset, mszOnScreen.width(), intOnscreenSpan); QImage imgSection(imgStrip.copy(rctSection));
  • qt report Form

    Unsolved
    2
    0 Votes
    2 Posts
    960 Views
    C
    Here is one approach you could find with 30 seconds of looking in the examples: https://doc.qt.io/qt-5/qtwidgets-richtext-orderform-example.html
  • Create a table and convert it to PDF

    Solved
    15
    0 Votes
    15 Posts
    1k Views
    Negar_mgN
    @eyllanesc thank you,i will try it.
  • Capturing the Headless Server image using QOpenGLFrameBufferObject

    Unsolved framebufferobje
    3
    0 Votes
    3 Posts
    387 Views
    S
    "`" QSurfaceFormat surfaceFormat; surfaceFormat.setMajorVersion(4); surfaceFormat.setMinorVersion(3); QOpenGLContext openGLContext; openGLContext.setFormat(surfaceFormat); openGLContext.create(); QOffscreenSurface surface; surface.setFormat(surfaceFormat); surface.create(); openGLContext.makeCurrent(&surface); QOpenGLFunctions *f = openGLContext.currentContext()->functions(); f->initializeOpenGLFunctions(); f->glFlush(); QSize vpSize = QSize(m_ScreenWidth, m_ScreenHeight); qDebug("Hi"); QOpenGLFramebufferObjectFormat fboFormat; fboFormat.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil); m_fbo = new QOpenGLFramebufferObject (vpSize, fboFormat); fboFormat.setTextureTarget(GL_TEXTURE_2D); RenderAllOPenGLWidgets(); // reendering all widgets based on timestamp. this->update(); QCoreApplication::processEvents(); QThread::usleep(1000); m_fbo->release(); QString ImageName = QString::number(FBOCaptureTime) + QString(".png");; QImage fb = m_fbo->toImage().convertToFormat(QImage::Format_RGB32); fb.save(ImageName, "PNG"); "`"
  • QByteArray dequeue() crash

    Unsolved
    4
    0 Votes
    4 Posts
    657 Views
    J.HilkJ
    @Abhi_Varma said in QByteArray dequeue() crash: @SGaist Yes. It is multithreaded app. and how can I protect the access to the queue. If you're unsure about this, maybe you shouldn't do multi threading to start with, especially as Qt-Classes/Modules have almost always asynchronous apis. For completeness however take a look at mutexes https://doc.qt.io/qt-5/qmutex.html https://en.cppreference.com/w/cpp/thread/mutex (I have added few more comments to the post at the end) My question why isn't my exception handling working and how can I resolve this. because c++ is not js or python, you can't move everything in a try catch block and be done with it. That only works when exceptions are actually thrown. 😉 An invalid pointer/instance access does not fall in that category :D
  • This topic is deleted!

    Locked Unsolved
    5
    0 Votes
    5 Posts
    65 Views
  • Undefined symbols for architecture x86_64:

    Unsolved
    2
    0 Votes
    2 Posts
    2k Views
    JKSHJ
    Hi, and welcome! @Victor-Dai said in Undefined symbols for architecture x86_64:: /usr/local/lib/libhiredis.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 You are using an x86_64 compiler but you are trying to link to an ARM64 library. That is not allowed. Some possible solutions are: Install an x86_64 version of libhiredis, OR Wait for Qt 6.2 to be released, and then build your application with an ARM64 compiler: https://bugreports.qt.io/browse/QTBUG-85279
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • View an image on QGraphicsView from resources

    Solved
    3
    0 Votes
    3 Posts
    1k Views
    S
    Hi, thanks for the answer, it works perfectly :D
  • QString % symbol

    Solved
    5
    0 Votes
    5 Posts
    745 Views
    JonBJ
    @SPlatten said in QString % symbol: "height:%1%2;}").arg(dblPercentOnView).arg("%")); For a literal % you should find QString accepts %%, so I would find simpler/more readable "height:%1%%;}").arg(dblPercentOnView));`
  • This topic is deleted!

    6
    0 Votes
    6 Posts
    29 Views
  • SSDP NOTIFY

    Unsolved
    2
    0 Votes
    2 Posts
    207 Views
    SGaistS
    Hi, When testing for an error, it's usually a good idea to at least print that something went wrong and not just exit early like you do in your constructor.
  • Adding Custom Widget to cell of QTableView

    Unsolved
    1
    0 Votes
    1 Posts
    397 Views
    No one has replied
  • Crash that occur only in debug mode with a simple project

    Solved
    23
    0 Votes
    23 Posts
    7k Views
    D
    I reinstalled Qt, the issue disappeared but now I'm having the commercial version of Qt ??!!?? Fixed this last issue by creating a new Qt account. Please Qt Company, fix your installer.
  • Capture keyboard exclusively

    Solved
    5
    0 Votes
    5 Posts
    407 Views
    M
    @mrjj Well… If I end up capturing an HID device exclusively, using native code, then it shouldn't cost much. Using an arduino-ish needs an arduino and a USB host on this device to make it a serial port. For now, I think costs would be equivalent (no device but more time using native code, device but less time using QSerialPort. Thanks for your input
  • Download QT 5.15.2 open-source via installation tool on windows

    Unsolved
    3
    0 Votes
    3 Posts
    292 Views
    D
    @sierdzio Thank you.
  • Mongodb doesn't work : inferior stopped, unknown signal

    Solved c++ qt5 mongodb qt creator
    19
    0 Votes
    19 Posts
    3k Views
    Vivek_AV
    still in mingw way problem not solved . so i choose msvc compiler to do that .. so iam closing this ...
  • How to get properly manage QMessageBox’s close signal

    Solved
    10
    0 Votes
    10 Posts
    3k Views
    SGaistS
    @Cobra91151 No worries, I saw that you deleted the dialog at the end of the method. Just pointing out that it's an easy to forget step and that in this case it was not necessary to use the heap for that. It's also one small thing that allows for reduced heap fragmentation.
  • Depending on the scrollbar status Show/Hide

    Unsolved
    1
    0 Votes
    1 Posts
    101 Views
    No one has replied