Skip to content
  • 0 Votes
    3 Posts
    156 Views
    E
    https://bugreports.qt.io/browse/QTBUG-135011 for anyone else encountering this, I have opened a bug with the upstream https://bugreports.qt.io/browse/QTBUG-135011
  • Getting C++ struct in QML as type

    Solved General and Desktop qml c++ struct
    8
    1 Votes
    8 Posts
    280 Views
    A
    @Asperamanca I tried to change the whole text to lowercase and that worked!
  • 0 Votes
    8 Posts
    472 Views
    F
    It's not worked also with any popup Widgets, Dialogs, Menus, Popups, etc. Also issue persist in the latest 6.8.3 and 6.9.0 and caused by this changes - https://codereview.qt-project.org/c/qt/qtbase/+/568225 (https://bugreports.qt.io/browse/QTBUG-135253) A created a separate issue, with steps how to reproduce it with the latest Qt version - https://bugreports.qt.io/browse/QTBUG-135253
  • Qt6.8.2 iOS: Keyboard invisible in the background

    Unsolved Mobile and Embedded c++ keyboard qt6.8.2 ios
    1
    0 Votes
    1 Posts
    106 Views
    No one has replied
  • 0 Votes
    4 Posts
    187 Views
    JonBJ
    @Poggar As the above two posts have said. Fastest way to convert Vector to QJsonArray? gives code and confirms there is no faster way than some sort of iteration over the C++ array adding elements to the JSON array, you can use std::copy() to save you writing a for loop yourself if you wish.
  • .jpeg / .jpg not displaying in CLion

    Unsolved General and Desktop c++ clion-ide
    2
    0 Votes
    2 Posts
    153 Views
    SGaistS
    Hi and welcome to devnet, I haven't used CLion yet but I found this tutorial from their documentation. Did you follow it ?
  • 0 Votes
    11 Posts
    2k Views
    D
    @JonB said in Connection signals for dynamically created widgets: Bit it does not! QGraphicsItems do not inherit QObject, only QGraphicsObjects do. You're right! I got confused when going up the inheritance tree in the documentation, I clicked on "inherited by QGraphicsObject" at some point thinking it was "inherits" instead. I didn't specify in a written manner that my StateWidget was a QGraphicsEllipseItem as I had added the declaration of the class in the first message. I changed the class to inherit QObject as well though and it worked! class StateWidget : public QObject, public QGraphicsEllipseItem { ... } The order of inheritance is important too. The "Test n" below comes from the AutomatLab::StateParams function so the signal is properly forwarded to the main UI instance! [image: 973931d7-e484-4597-8d82-5c6be4cefda8.png] Thank you for your help!
  • 0 Votes
    6 Posts
    512 Views
    I
    @Khamza It is quite hard to tell. The piece of code you pasted has several issues unfortunately, and it would very hard to say what the exact cause it without the whole thing to reproduce. I'll say that the most pressing problem in the code is that you are using values that are in document coordinates (which is what the rectangle that QAbstractTextDocumentLayout::blockBoundingRect returns is in) to calculate parameters for a QPainter which works in viewport coordinates. These are not the same, especially when there are scroll bars shown, and in my experience the main cause of issues around scrolling. That said, it wouldn't explain the text itself just disappearing when scrolling back up; I'd expect it to just be garbled. First try to comment out your paintEvent to see if text is drawn correctly at the expected positions when scrolling back and forth - perhaps something in the formats isn't right. Otherwise, please post a complete yet minimal project that reproduces the problems you see.
  • 0 Votes
    4 Posts
    216 Views
    JonBJ
    @Khamza You are not supposed to just call paintEvent() from somewhere else, it's designed to be called during actual painting. If you override a base paintEvent() you can (and should) indeed call the base implementation from there.
  • 0 Votes
    3 Posts
    262 Views
    M
    @Bonnie Thank you for pointing me in the right direction. I turns out the issue wasn't height, or min-height, but rather an inherited padding, that just happened to make it look like it was expanding to the full height of the QHBoxLayout.
  • QT 6.8.0: Comparison of QDateTime is wrong

    Solved General and Desktop qt 6.8.0 c++ qdatetime
    19
    0 Votes
    19 Posts
    1k Views
    Christian EhrlicherC
    @TheoSys said in QT 6.8.0: Comparison of QDateTime is wrong: Then it's my fault No problem. Datetime with databases is not that easy as it seems so there might still be problems in the drivers even though I spent a lot of time with this 🙂
  • 0 Votes
    8 Posts
    605 Views
    JonBJ
    @SergeyK12 Are you aware that in a QStandardItemModel you can create a parent-child hierarchy? E.g. start from https://doc.qt.io/qt-6/qstandarditemmodel.html#details and QStandardItemModel::insertRow(int row, const QModelIndex &parent = QModelIndex()) etc. So why don't you store your model like that if it's hierarchical? Unless you mean you start with a QStandardItemModel which is flat and multi-column like the first one, for whatever reason, and want to display that in the second way. For that yes a proxy like yours would be good.
  • 0 Votes
    4 Posts
    1k Views
    aha_1980A
    The second failure ninja: build stopped: subcommand failed. is a direct successor of the first error. Fix the first error, and the second will disappear. the file does exist and is in the include directory Can you tell us the path to this directory? According to the compiler command line, your compiler searches in the following directories: -I/Users/jamesmartin/sourceCode/C++/qt/QTCurvesCPP2/build/Desktop_arm_darwin_generic_mach_o_64bit-Debug/QTCurvesCPP2_autogen/include -isystem /Applications/qt/6.7.2/macos/lib/QtCore.framework/Headers -iframework /Applications/qt/6.7.2/macos/lib -isystem /Applications/qt/6.7.2/macos/mkspecs/macx-clang -isystem /Applications/qt/6.7.2/macos/include -isystem /Applications/qt/6.7.2/macos/lib/QtWidgets.framework/Headers -isystem /Applications/qt/6.7.2/macos/lib/QtGui.framework/Headers which seems a bit strange to me as it does not have any source directory in the list. Can you show your CMakeLists.txt?
  • 0 Votes
    14 Posts
    1k Views
    JonBJ
    @jeremy_k said in Console App how to populate a 10.000*10.000 Grid efficiently?: A easy optimization for setting a quadrant or an entire 2d space as a single color is to remove all subtrees of that tree, Absolutely. If that's the sort of thing you want to do. Doesn't seem to relate to toggling the state of 100,000 adjacent bits in 5 million. it stores all squares that shall be changed in a vector. The squares changed can be anywhere in this big map, eventually reaching many millions of squares needed to be changed at onces. If that is what you need to do, again I'm not sure I see any use of these quadtrees. But only you need the exact situation.
  • MT4 Manager API on QT

    Unsolved General and Desktop socket c++ mfc
    5
    0 Votes
    5 Posts
    447 Views
    B
    Hi. Thank you for the explanation. @Pl45m4 said in MT4 Manager API on QT: Since the MT4 API is probably incompatible with QTcpSocket by default and you probably need to use the Manager's connect function to make everything that is going on in the background work properly, I don't see why you need to use the Qt socket classes, assuming this MT4 Manager has its own internal socket stuff?! I could be wrong, though. Yes this is correct. The only thing is that, when i use the MT4 Manager to connect to the server, it always returns "no connection" error, which means, the MT4 Manager can't establish connection to the server, of which the server is online and i have run the C++ program with the same server credentials.
  • 0 Votes
    16 Posts
    3k Views
    M
    Hi @dheerendra I think the issue was in NO_PLUGIN as were suggested by @Anumas here: https://forum.qt.io/post/802964 Seems to be working fine with static library now. I marked that message as a solution.
  • 0 Votes
    3 Posts
    395 Views
    Axel SpoerlA
    …and on a side note: Qt 5.15 isn’t ideal to start developing a new app! Much better to start with 6.5!
  • Native context menu on macOS

    Unsolved General and Desktop macos c++ objective-c menu
    1
    0 Votes
    1 Posts
    407 Views
    No one has replied
  • Error when Loading QImage

    Solved General and Desktop c++ qt creator qt 6.7.1 qimage load image
    13
    0 Votes
    13 Posts
    1k Views
    B
    @hskoglund Yes. I also have MinGW installed separately on my computer so I could try quickly making another kit with those and see if it works. Edit: Changing the version of MinGW in the kit worked! I tried using regular MinGW 64-bit and that made it work perfectly. Thanks so much