Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 457.9k Posts
  • Qt Creator setup on Ubuntu 20.04 LTS

    Solved
    2
    0 Votes
    2 Posts
    4k Views
    D
    After additionally installing these dependencies: sudo apt install qt5-doc qt5-doc-html qtbase5-doc-html the examples appeared. To get some desktop examples to build, I also had to install these: sudo apt install cmake clang-8 libclang1-8 and then make sure that the qt-version and cmake-tool were set in Tools > Options > Kits Edit: I ended up selecting /usr/lib/qt5/bin/qmake (I think the other qmake scripts would also work), the "no qmlscene installed" message is still present, but doesn't seem to be a problem.
  • Couldn't rebuild my older project

    Solved
    2
    0 Votes
    2 Posts
    147 Views
    L
    I figured out the problem, it was caused by my file path name being too long. It worked when I shortened the folder name.
  • Is it possible to develop a GUI using external libraries like Pytest?

    Unsolved
    2
    0 Votes
    2 Posts
    221 Views
    eyllanescE
    @Tonyvazquezzz Yes, it is possible.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • How to get qmake to support assembly language?

    Unsolved
    4
    0 Votes
    4 Posts
    456 Views
    P
    OK thanks, here's what I found works: ASM_FILES += myfile.asm ASMEXTRAFLAGS = -march=armv8-a QMAKE_EXTRA_TARGETS += myfile.o asm.output = ${QMAKE_FILE_BASE}.o asm.commands = as $$ASMEXTRAFLAGS -o ${QMAKE_FILE_BASE}.o ${QMAKE_FILE_NAME} asm.input = ASM_FILES QMAKE_EXTRA_COMPILERS += asm
  • Rotate a QLine

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    S
    Hi, thanks for the response. That was not what I was looking for, but I found another way. I used QGraphicsScene.
  • Same slot name executing on parent.

    Solved
    9
    0 Votes
    9 Posts
    751 Views
    JonBJ
    @Nekreg45 See Nailing 13 signal and slot mistakes with clazy 1.3. That's KDAB and from 2018. It suggests: connect-by-name Warns when auto-connection slots are used. They’re also known as “connect by name”, an old and unpopular feature which shouldn’t be used anymore.
  • getting no response from QWheelEvent

    Solved
    13
    0 Votes
    13 Posts
    774 Views
    SGaistS
    Great ! Since you have it working now, please mark the thread as solved using the "Topic Tools" button or the three doted menu beside the answer you deem correct so that other forum users may know a solution was found :-)
  • Error when creating query with QSqlQuery

    Solved
    3
    0 Votes
    3 Posts
    230 Views
    SGaistS
    Hi, Glad you found out, don't forget to mark the thread as solved using the "Topic Tools" button so other forum users may know a solution has been found :-)
  • Signals and Slots not connecting

    Unsolved
    2
    0 Votes
    2 Posts
    219 Views
    JonBJ
    @aftershocker1 said in Signals and Slots not connecting: //objects declared QtTestTool qttesttool; SPS2data sps2data; Where are the these declared? As member variables in an instance which persists? I would expect those lines in the class declaration in the .h file, not in the .cpp file..... Your connect() looks good.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • Find and store each uppercase letter in button text

    Solved
    4
    0 Votes
    4 Posts
    304 Views
    K
    @sierdzio damn exactly what i was trying todo! :) thank you so much for that :)
  • Networking library

    Unsolved
    8
    0 Votes
    8 Posts
    700 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
    435 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
    971 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
    2k Views
    Negar_mgN
    @eyllanesc thank you,i will try it.
  • Capturing the Headless Server image using QOpenGLFrameBufferObject

    Unsolved framebufferobje
    3
    0 Votes
    3 Posts
    420 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
    687 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