Skip to content
  • QFileDialog on different platforms

    Unsolved General and Desktop
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • 0 Votes
    1 Posts
    41 Views
    No one has replied
  • Detect current CMake configuration type. How?

    Unsolved General and Desktop
    12
    0 Votes
    12 Posts
    76 Views
    I
    @bogong said in Detect current CMake configuration type. How?: Why the simplicity of just "if-else" exchanged on complexity of the tricks of f-wording generators There is no need for the kind of language here. CMake is complex, because cross-platform build engineering is inherently complex. When you use a tool you need to understand it, and the fact that CMake has distinct configuration, generation and build phases (each with its' own way of specifying what should run at that phase) is often uncomfortable but important. @bogong said in Detect current CMake configuration type. How?: ${CMAKE_BUILD_TYPE} variable. It's just empty. @bogong said in Detect current CMake configuration type. How?: In my project only XCode used Xcode is exactly one of the generators that are multi-configuration (alongside MSBuild); where the same set of final build system files (i.e post configuration/generation) is used to make all build configuration. The variable is empty because variables are set during the configuration phase, and it wasn't set. As you shown, the actual build configuration is only passed to the cmake --build invocation - hence only available during the build phase. This is pretty unavoidable, even if you try to manually pass -DCMAKE_BUILD_TYPE=Debug or something to CMake directly alongside -G Xcode to do a a manual CMake configuration, it will just be ignored. That's how Xcode project files work... If that's what Qt Creator's wrapper is doing, what Qt Creator shows is of no relevance. Also see this note in CMake documentation: https://cmake.org/cmake/help/v4.1/generator/Xcode.html#limitations @bogong said in Detect current CMake configuration type. How?: For example for iOS for Debug - one Info.plist file for Release another one set of the files. Even on generators that do support that (and again, Xcode doesn't) CMake doesn't make this pattern very easy - mostly because it is a bit of an abuse of the concept of build configurations. Configurations are meant to affect the flags that are passed to the build tools when making targets, not so much the shape of the dependency graph of the targets among themselves. Luckily that's not what you are actually trying to do (although you appear to think so) - you don't want different files between build configurations, you want different content for the same file. That can certainly be done, with a custom build target. This is completely unrelated to Qt, but there are many examples around and if you want to delve into this the CMake Discourse site will be more appropriate place. You'll probably love the syntax even less than the one for generator expressions though... (not that you have much of a choice, really).
  • 关于Qt生成的动态库,可以在其他编程语言调用嘛?

    Moved Unsolved Chinese
    1
    0 Votes
    1 Posts
    57 Views
    No one has replied
  • 0 Votes
    2 Posts
    50 Views
    SGaistS
    Hi, Did you check if the configuration of Qt Creator itself have been reset ? I am not sure whether they would be in the registry or in a file on Windows. By default it should be the former though.
  • qthread conflict with _I in VS2022, BUT ok in qt5

    Unsolved General and Desktop
    2
    0 Votes
    2 Posts
    35 Views
    Christian EhrlicherC
    include the Qt headers first
  • Cryptic malloc crash

    Unsolved General and Desktop
    6
    0 Votes
    6 Posts
    116 Views
    jeremy_kJ
    @IgKh said in Cryptic malloc crash: @Jackmill reserve vs resize isn't the root cause here; though resize is the correct method to use. The problem is that by the time msgStart returns, buffer (which is local) is destroyed and the pointer taken from buffer.data() is dangling. Correction: msgStart() returns the pointer returned by QByteArray::data(). If it returned buffer, the lifetime of the object would have been extended to the end of EosOscMessage::osc::OutboundPacketStream(). #include <QByteArray> #include <QString> #include <QDebug> struct Array : public QByteArray { QString m_tag; Array(QString tag) : m_tag(tag) { qDebug() << Q_FUNC_INFO << tag; } ~Array() { qDebug() << Q_FUNC_INFO << m_tag; } }; Array returnArray() { Array a("returnArray"); return a; } char * returnData() { Array a("returnData"); return a.data(); } int main(int argc, char *argv[]) { qDebug() << "returnArray()"; auto array = returnArray(); qDebug() << "/returnArray()"; qDebug() << "returnData()"; auto data = returnData(); qDebug() << "returnData()"; } Output: returnArray() Array::Array(QString) "returnArray" /returnArray() returnData() Array::Array(QString) "returnData" Array::~Array() "returnData" returnData() Array::~Array() "returnArray"
  • QT6.8 c++ QWebEngine ... Web pages start with main windows flickering

    Unsolved QtWebEngine
    8
    0 Votes
    8 Posts
    99 Views
    SGaistS
    6.7.3 is a bit old. You might want to try with the latest of the 6.9 series to see if things improve with regard to webengine. One thing, are you in debug or release mode ? That can have some impact on performances.
  • Xcode26 any experiences / problems ?

    Unsolved Mobile and Embedded ios xcode
    1
    0 Votes
    1 Posts
    26 Views
    No one has replied
  • QIcon crop when drag and display it in a QScrollArea

    Unsolved Qt for Python
    2
    0 Votes
    2 Posts
    97 Views
    SGaistS
    Hi and welcome to devnet, Why are you doing all these scaling operation to, in the end, not used that scaled pixmap ? In any case, you should start by making it work without particular scaling or fixed size. Once you have ensured that you have the icon properly working, you can start scaling the icon, and only once you are sure you have what you want, fix the size of the QLabel. That said, why not use a QListView/QListWidget to show these icon.
  • 0 Votes
    4 Posts
    94 Views
    ekkescornerE
    6.9.3 will come out next week https://wiki.qt.io/Qt_6.9_Release
  • Error while trying to use svg image

    Unsolved QML and Qt Quick
    1
    0 Votes
    1 Posts
    88 Views
    No one has replied
  • 0 Votes
    2 Posts
    61 Views
    SGaistS
    Hi and welcome to devnet, I can't currently but: did you follow this example ?
  • SDL3 Lib in Qt6

    Unsolved General and Desktop sdl joysticks button gamepad general problem
    2
    0 Votes
    2 Posts
    110 Views
    SGaistS
    Hi, I found again this thread that presented the QJoysticks project that might give you a starting point.
  • 0 Votes
    4 Posts
    123 Views
    jsulmJ
    @GyroPower Just create your render thread before you call Qt_wb_app_manager.exec();
  • Qt Plugins external folder?

    Unsolved Qt Creator and other tools
    13
    0 Votes
    13 Posts
    182 Views
    D
    okay so i think this is a bug
  • Can't build Webengine from source

    Unsolved General and Desktop
    4
    0 Votes
    4 Posts
    205 Views
    J
    I've tried all possible way, surpressed most errors regarding missing depencies But these were unbeatable, fixed by setting flags /home/j/Desktop/tmp/qt-everywhere-src-6.2.4/configure -skip qtwebengine -skip qtwebsockets -no-feature-translation CMAKE_PREFIX_PATH LLVM_INSTALL_DIR QDoc
  • Using QtCharts in a Pyside6 Application

    Unsolved General and Desktop
    1
    0 Votes
    1 Posts
    57 Views
    No one has replied
  • A Beginner’s Question

    Unsolved General and Desktop
    3
    0 Votes
    3 Posts
    113 Views
    A
    @jobor thanks for your answer,Yesterday I looked up some more information. For host-computer programs and similar applications, isn’t the common practice to write methods in C++ classes, register them to QML, and then call these classes during runtime? Qt comes with many sample projects, and from what I’ve seen, quite a few follow this approach. However, what I urgently need right now is a complete project with sufficient backend logic to study.
  • 0 Votes
    1 Posts
    110 Views
    No one has replied