Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Tree selection clears when data model refresh

    Solved
    9
    0 Votes
    9 Posts
    899 Views
    A
    I am able to fix this by refreshing the seleced rows instead of reloading complete data model. Thanks both of you for the help.
  • OpenGL Volume Rendering Qt6

    Unsolved
    5
    0 Votes
    5 Posts
    599 Views
    S
    @Zeroth said in OpenGL Volume Rendering Qt6: The OpenGL/Vulkan widget looks good, but is something similar for QtQuick/QML? I don't have experience with QML. However, the first hit on Google is this: https://doc.qt.io/qt-6/qtquick-scenegraph-openglunderqml-example.html . It also links to a version for Vulkan: https://doc.qt.io/qt-6/qtquick-scenegraph-vulkanunderqml-example.html . And there is also Direct3D 11 and Metal.
  • The table overlaps with other layout

    Unsolved
    10
    0 Votes
    10 Posts
    852 Views
    E
    Pin, anybody help?
  • QScroller with QScroller::TouchGesture does not delay touch event

    Unsolved
    3
    0 Votes
    3 Posts
    289 Views
    W
    @JoeCFD The eventfilter affects how widgets respond to touch, for example, buttons will not be clicked by touch. In fact, we wanted a way to make it easy for all QAbstractScrollAreas to scroll when touched without affecting normal touch interactions, just like QML's ScrollView. If QScroller performs better when touched, we can make all QAbstractScrollArea in the desktop environment use QScroller by default to support touch scrolling.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • CreateWindow() for QEventDispatcherWin32 internal window failed

    Unsolved
    10
    0 Votes
    10 Posts
    2k Views
    franco.amatoF
    @npatil15 said in CreateWindow() for QEventDispatcherWin32 internal window failed: QThread *thread; Why did you create the member variable QThread *thread in the LogService that's never used?
  • Connection failed on qchildevent after converting code from qt3 to qt4

    Solved
    4
    0 Votes
    4 Posts
    303 Views
    G
    @SGaist @giusdbg I think I found and solved (if there will be no side effects), there are different event handling in qt4. This way the added event is called while the Sensors object is still being built, and the connect fails. Sensor::Sensor(SensorsList *parent,const char *name): QObject(parent) In this way the added event takes place after the construction of the Sensors Sensor::Sensor(SensorsList *parent,const char *name): QObject() ........ setParent(parent);
  • QFontComboBox custom item height

    Unsolved
    4
    0 Votes
    4 Posts
    421 Views
    W
    @Gojir4 @mpergand Thanks for the replies! It seems none of your proposed solutions kept the styling or changed just the height of items, maybe it's not possible at all without significant amount of work :(
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    4 Posts
    703 Views
    SGaistS
    The online installer provides 5.15.2. It also provides a more recent version of Qt Creator which might work better than the one you are currently using.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    27 Views
    No one has replied
  • C++ std::chrono really slow in Qt

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    Kent-DorfmanK
    To address the 2ton white elephant in the room: There is no such thing as a real-time simulation on any desktop PC! You are using a multi-tasking, preemptive (timesharing) system where background tasks can/will skew your results. Correct simulations emulate real-time by keeping an internal pseudo-timer counter such that the "state" of the simulation can be restored to any point by running the sim until the pseudo-timer reaches the desired value. You can sync your pseudo-timer to the RTC on the PC, but you need to understand that you cannot rely upon the RTC to timekeep for any real simulation.
  • Error building some meta-compiler dependencies

    Unsolved
    3
    0 Votes
    3 Posts
    388 Views
    M
    @JonB said in Error building some meta-compiler dependencies: When/if you add Q_OBJECT macro to source after you have previously compiled you must "clean" everything before you recompile. I do this by deleting the build output directory, I don't know if any of Creator's "clean" menu items is enough. Have you done this? If not you get weird linker errors, which I suspect is what you have now. I tried to close my project, delete /.vs and /.out folders and build my project again and it did not worked. But after I deleted Q_OBJECT my project at least started building but failed with this error in cmd: qt.qpa.plugin: could not find the qt platform plugin "windows" in "" this [image: 5ed0763d-532f-4fdd-9601-fca1f0906d2e.png] It is quite off-top but I already saw some topics with new error but in PyQt and you have answered something there. Maybe you have idea about similar case in C++, VS? (I already tried to copy .dll files from folder platforms located in Qt root directory to ...\out\build\x64-debug\ and it didn't worked)
  • QEvent does not override

    Unsolved
    5
    0 Votes
    5 Posts
    486 Views
    C
    @misscoffee Missing obvious things happens to most of us, don't worry about it (unless it occurs frequently...).
  • CompositionMode in between QGraphicsItem

    Unsolved qgraphicsview qgraphicsitem qpainter rendering
    5
    0 Votes
    5 Posts
    1k Views
    S
    @JonB thanks for googling :) . I have seen some more example. In case of GraphicsView fill transparent on scene did not help. I am pretty sure there is some way to do it, need to google more
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • How to have a live text feed that updates

    Unsolved
    4
    0 Votes
    4 Posts
    341 Views
    R
    @JonB I tried both. I tried to figure out a way to do it line by line (I think the issue is your appending faster than the ui can update so its freezing up, I think I read somewhere where this is the case). I also tried just making a string and appending the lines to it and either doing it in batches of 100,1k lines and then finally tried just saying oh well and doing all of it in one append but its almost same runtime on ui displaying. Note: QPlainTextEdit did seem slightly less delayed when i did insert but it is well after the comparisons are done. @mpergand I will look into threads, I was thinking this was probably going to be the way to do it. Unfort, im pretty knew to threading so Ill have to look over it and try to implement it over the weekend. Ill update how the threading vs. repaint works compared to the other methods ive tried. Like I said its not like the 5-6s of freeze is a big deal, I was just curious of other methods.
  • Reloading JavaScript files with QJSEngine

    Unsolved
    3
    0 Votes
    3 Posts
    385 Views
    P
    @JonB This does not bode well indeed ! Unfortunately, I don't think I can consider loading the scripts as strings: the scripts may themselves use the import statement, which I assume uses the same mechanisms as importModule. Though that opens the possibility of not using ECS6 imports and instead implementing my own system of import. Sounds like it would be fairly complicated, but that might be worth a try. Thanks for your help !
  • 0 Votes
    8 Posts
    1k Views
    goldenhawkingG
    A funny way to pass messages between processes is the STD pipes, stdin, stdout. You can design a stdin/stdout proxy using QProcess's QIODevice interfaces. This proxy will fork your Qt app and VS app together as child processes, and read data from one's stdin, pass data to another's stdout. In Win32, text data can be passed directly, while BIN data should be enabled with setmode: #include <stdio.h> #include <fcntl.h> #include <io.h> int main( ) { // Set "stdin" to have binary mode: _setmode( _fileno( stdin ), _O_BINARY ); //... } This method enables you to direct use scanf, printf , fread, fwrite for cross-process communication.