Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • QML and memory leaks

    Solved qml memory leak asan
    3
    0 Votes
    3 Posts
    2k Views
    T
    Hi @kiozen, I am using Qt creator on windows. Please let me know how to run a application with ASAN on qt
  • qvideowidget causes mouse event exception

    Unsolved
    1
    0 Votes
    1 Posts
    156 Views
    No one has replied
  • 0 Votes
    4 Posts
    1k Views
    C
    @JacobNovitsky Just so that you understand why only changed source files are recompiled you need to understand three things: qmake creates a Makefile from your PROject file. (So does cmake in many circumstances). Make is a tool designed to reduce compilation times, something about which you have been vocal before, using the rules in the Makefile to minimise what is recompiled and/or relinked. The compiler (linker) can only issue warnings about source code (objects and libraries) if it is compiling source code (linking object files). Since changing any source code file will change its corresponding object file, and the output executable depends on all its input object files, the linker is almost always run by make in the Qt environment. You should be striving to make code in which no warnings are issued at all. This is why @J-Hilk suggests -Werror.
  • building Qt MYSQL driver for MAC OS

    Solved
    9
    0 Votes
    9 Posts
    912 Views
    A
    @SGaist said in building Qt MYSQL driver for MAC OS: QT_DEBUG_PLUGINS I will try that but I did find that rebooting apparently solved the problem. I did that after cleaning and rebuilding failed to resolve the issue. Thanks, your quick response is appreciated.
  • Creating a Qt static c++ library for non-Qt c++ application

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    SGaistS
    @Christian-Ehrlicher said in Creating a Qt static c++ library for non-Qt c++ application: @SGaist This will not work as the op exports a class derived from Qt (at least this is my guess) but yes, this can be an option. But as already discussed there are only a few Qt classes which work without a Q(Core)Application or a running event loop. You can abstract this all away and add a wrapper class which convrts between Qt and plain c++ but this is cumbersome and still does not fix the event loop problem. 100% agreed, it was just to propose a possible solution but it clearly makes things more complicated that way.
  • Need to set password for my DB

    Unsolved
    2
    0 Votes
    2 Posts
    235 Views
    Christian EhrlicherC
    SQLCipher has 3.44.2 in it's repo. And they also provide commercial support so...
  • How to change icon size in QMenu's action item?

    Unsolved
    7
    0 Votes
    7 Posts
    992 Views
    A
    @Christian-Ehrlicher thanks for the help, I will look into it. One more question, I'v used QMenu's paintEvent for round corners. The problem is that the resulting round corners are not properly smooth. I've used QRegion and QPainterPath in the paintEvent to set menu's mask using setMask.
  • Qt build failed on .rcc/qmlcache/quicktooling_component_qml.cpp

    Unsolved
    5
    0 Votes
    5 Posts
    976 Views
    jsulmJ
    @skeud said in Qt build failed on .rcc/qmlcache/quicktooling_component_qml.cpp: do you know if there is an option to avoid qmlcachegen? I don't know. But the crash could be due to anti-virus software blocking this executable.
  • List of .tags files for doxygen for Qt5 and Qt6

    Unsolved
    17
    0 Votes
    17 Posts
    3k Views
    redtideR
    @Paul-Colby I've released the module under BSD-3-Clause (the same as CMake, itself). Contributions more than welcome :) Great! I'll give you some feedback when I'll add it to a small kit of mine with the same license to be installed in Linux systems, as support for some applications I made. Thank you again for this!
  • QUndo/Redo crashes, help me investigate

    Solved c++ qt qundocommand
    7
    0 Votes
    7 Posts
    1k Views
    SGaistS
    @StudentScripter When you set an item in the model, the model becomes the owner of the item and thus controls its lifetime. If calling removeRows would leave the item(s) it contains intact, you would just have a memory leak by now.
  • QListView: Add tooltips to each entry

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    B
    Wow a lot of oportunities. Thanks a lot. I will check this out. Sorry, I was really locking into the docs but wasn't able to find the related constructs. On the other hand I have to explain, to my defense, I have not constructed that specific ListView myself. It is code I took over.
  • Problems running QtVirtualKeyboard with Wayland Compositor

    Solved
    2
    0 Votes
    2 Posts
    1k Views
    N
    Apologies, this is a known issue, the application-integration method using the QML InputPane has to be used with Wayland, desktop integration won't work, see bug report The docs do also say application integration is mandatory in environments where there is no support for multiple top-level windows. That will teach me to RTFM!
  • sceneRect() not updated immediately after window resizing

    Solved scenerect qgraphicsview
    9
    0 Votes
    9 Posts
    1k Views
    O
    @JonB You are absolutely right! I was confused between the QGraphicsView and the QGraphicsScene. I just realised that when I was playing with my POC. Actually, what change the size of the QGraphicsScene is done in another part of my code and is called later. If I recalculate the sceneRect according to my needs and call setSceneRect(), when my window is resized, everything works as expected. Sorry for the inconvenience.
  • How to build qt charts with profile option in mingw64?

    Unsolved
    1
    0 Votes
    1 Posts
    180 Views
    No one has replied
  • QOpenGLWidget cpu usage is abnormal

    Unsolved
    1
    0 Votes
    1 Posts
    179 Views
    No one has replied
  • Problem on changing QSqlRetionalTableModel result column value.

    Unsolved
    2
    0 Votes
    2 Posts
    186 Views
    SGaistS
    Hi, You are using the wrong tool. You should not try to change the data, it's only a viewing thing. You should rather implement a custom QStyledItemDelegate and implement the displayText method. In there do your transformation.
  • Open file with double click on Mac

    Locked Unsolved
    11
    0 Votes
    11 Posts
    6k Views
    SGaistS
    @ghart976 hi and welcome to devnet, You should either give more details or better: open a new thread about the topic you want to discuss. This one is 7 years old and not related to zsh at all but Finder.
  • QMetaType casting to desired type

    Unsolved
    11
    0 Votes
    11 Posts
    2k Views
    jeremy_kJ
    @Redman said in QMetaType casting to desired type: @jeremy_k I'm talking QtRemoteObjects. I intentionally left that piece of information out because every time I mention them in this forum my posts never get answered. That's an important detail. It sounds like a useful project. I personally have remained minimally interested due to the project's stated lack of interest in compatibility with non-QRO implementations. I'm not lucky enough to work in a distributed environment where all nodes run a compatible Qt application. This switch statement is gonna get bigger and bigger aswell as be error prone. Is there any way to make this piece of code dynamic? I was imagining: template <class Type, class... Others> std::any convert(void *obj) { QMetaType fromType = QMetaType::fromType<NetworkClass>(); QMetaType toType = QMetaType::fromType<Type>(); std::any ret; if QMetaType::canConvert(fromType, toType) { QMetaType::convert(obj, fromType, &ret, toType); return ret; } else return convert<Others...>(obj); } template <> convert(void *obj) { return std::any(nullptr); } NetworkClass *obj = getObject(); std::any convertedObject = convert<Type1, Type2, Type3>(obj); if (std::any_cast<void *>(convertedObject) != nullptr) ... Not expected to compile as is Not runtime dynamic The user of the std::any will need to know what it wants to convert it to I'm not sure this improves the situation.
  • Json iteration

    Unsolved
    3
    0 Votes
    3 Posts
    325 Views
    R
    @JonB Thanks for the hints
  • adding new class in Qt Creator

    Unsolved
    8
    0 Votes
    8 Posts
    588 Views
    H
    @jsulm @Sebastiano-Zamberlan ok, thank you, I found it... strange, that there's no hint in the helpfiles how to do such a simple thing.....