Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • QOpenGLWidget Problem

    Unsolved
    4
    0 Votes
    4 Posts
    373 Views
    SGaistS
    With the code you posted, there's no way to know what RenderModel is so it might just be a value that does not do anything in your switch statement. You should start by simplifying your code and strip away all the complexity. Then start by adding the minimal amount of stuff to actually show something on the widget and only then add the loading of your file. On a side note, please use a clean style when writing your code. You are mixing TitleCase, camelCase and snake_case is the same code base which makes it quite painful to go through. Same goes for your variable naming.
  • Qt gRPC - get return value of a call asyncronously

    Unsolved
    2
    0 Votes
    2 Posts
    191 Views
    SGaistS
    Hi, Since the callback is a lambda, why don't you pass the reply to it the same way you do for this ?
  • how to create QChars dynamically??

    Unsolved qchart qcharts
    10
    0 Votes
    10 Posts
    1k Views
    JonBJ
    @timob256 There is nothing more to say. Code like the stuff you are using. Replace new QPushButton with code for new QChartView plus its own QChart as above.
  • Insertings rows into QSQlite database eats up all RAM Memory

    Unsolved
    5
    0 Votes
    5 Posts
    299 Views
    Christian EhrlicherC
    @JonB The QSqlQuery is on the stack when it's not static so... And the clear also happens on each new exec/prepare.
  • How to send args to MainWindow function

    Unsolved
    11
    0 Votes
    11 Posts
    901 Views
    J
    @CompSciDude Thanks, dude! I would stuck for long time if not your post
  • QFileDialog corrupted! QT bug?

    Unsolved
    2
    0 Votes
    2 Posts
    232 Views
    C
    @NeilWang said in QFileDialog corrupted! QT bug?: Exception thrown at (in QtGuiApplication3.exe): 0xC0000005: Access violation while reading location 0x0000000000000000 Almost certainly accessing a null, uninitialised, or otherwise invalid pointer. There is nothing in the code you have posted that is an obvious cause for that. Delete all the intermediate files and do a complete rebuild of the project. Run a debug build of your program in the debugger, reproduce the error, and then copy and paste the text of the stack backtrace. Also post the exact code you compiled referenced by the stack trace.
  • checkbox in floating menu (MainWindow ui)

    Unsolved
    6
    0 Votes
    6 Posts
    645 Views
    JonBJ
    @JacobNovitsky Exactly as I and @Pl45m4 wrote. As we said, I asked and tried just this maybe a year ago, and it does not work. Checkboxes do not work if the item is a sub-menu, they only work and are intended for use on an item which performs an action. Found the topic: Is a QMenu item supposed to be able to be checkable?
  • CMake issue

    Unsolved
    3
    0 Votes
    3 Posts
    211 Views
    sierdzioS
    @JacobNovitsky said in CMake issue: cmake_minimum_required(VERSION 3.5) Qt 6 requires cmake version 3.16. To fix your problem, I think you need to add this line: set(CMAKE_INCLUDE_CURRENT_DIR ON) It will automatically include path to current source dir.
  • can we define a std::thread on QThread

    Unsolved
    6
    0 Votes
    6 Posts
    723 Views
    S
    The only place where I could imagine a QThread to be slower than a std::thread is during creation/destruction. Once it is running, there is no difference. The default implementation of QThread starts a QEventLoop. There is a chance that you could start your own event loop inside a std::thread. Though Qt might use calls to check for the corresponding QThread of a QObject. You could certainly emit signals from a std::thread as these are "regular" functions calls. You might have to make sure that your connections are Qt::QueuedConnections. Both QThread and std::thread need to use the OSes underlying thread functions to control threads. So, if you want to wrap a std::thread into a QThread, a QThread is already wrapping a std::thread, but without the std::thread in the middle.
  • How to avoid ScrollBar ,I hope it appears only when necessary!

    Solved
    17
    0 Votes
    17 Posts
    940 Views
    S
    @XiaofengXu said in How to avoid ScrollBar ,I hope it appears only when necessary!: Itseems that Changing the size of the parent form can cause the size of the child form to change, but the opposite is not true. This observation is correct. Though you can use setMinimumSize() to force the parent to expand. The QScrollArea, however, prefers to scroll instead of extending. I am not sure if you can force the scroll area to only scroll vertically, but adjust horizontally to the size of its assigned widget.
  • Generate binary file with pyinstaller

    Solved
    14
    0 Votes
    14 Posts
    1k Views
    X
    @SGaist I clean it and I looked at the python package version. I notice that the PySide version installed was the 5.15.2 and the matplot uses the 5.15.0. I modify the PySide versin and now the package are compatible.
  • Temp

    Unsolved
    2
    0 Votes
    2 Posts
    134 Views
    jsulmJ
    @Pappu-Kumar-Keshari What is this?
  • 0 Votes
    1 Posts
    177 Views
    No one has replied
  • multiple QT applications on an embedded ARM Linux platform

    Unsolved
    3
    0 Votes
    3 Posts
    295 Views
    B
    @SGaist Yes, I have also considered this reason. I will try to see if I can resolve it. Thank you!
  • Is QGraphicsItemGroup a good design choice for editable diagram elements?

    Unsolved
    1
    0 Votes
    1 Posts
    129 Views
    No one has replied
  • no member named 'cout' in namespace 'std'

    Solved
    7
    0 Votes
    7 Posts
    10k Views
    S
    @Kopilov Thank you!! Worked for me fine
  • Locating the source of heap corruption (setup and general guidelines)

    Solved
    2
    0 Votes
    2 Posts
    551 Views
    deisikD
    AddressSanitizer is the way to go and debug
  • QT With Cloud Database

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    R
    @CKurdu Thank you very much for the information and for the shared links.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    15 Views
    No one has replied
  • How to obtain the battery design capacity of a laptop?

    Unsolved
    9
    0 Votes
    9 Posts
    558 Views
    Christian EhrlicherC
    Please stop posting images but your code with the proper code tags. Your code prints something to stdout and not to a widget from your former post. What do you expect? That stdout is magically redirected to your widget?