Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • Custom rendering and camera handling in QT Data Visualization

    Unsolved
    2
    0 Votes
    2 Posts
    561 Views
    M
    @Armin303 Hi, man. Do you solve this? I mean that using a custom mesh style for q3dscatter points.
  • 0 Votes
    5 Posts
    2k Views
    O
    @SGaist @JonB With inspiration from QTableWidget sources my approach for internal reordering is now to override dropEvent and in there use moveRows. if (event->source() == this) { // It's an internal move, a solution based on overridden QAbstractItemModel::moveRows That works for internal reordering. It seems like QDrag::exec is supposed to return an action performed but I find no information on how the information about a successful drop shall get back to the source widget and also the call to QDrag::exec is buried deep within a mouse event handler for QAbstractItemView. My solution is to also implement copy-or-move in an overridden dropEvent. First let the base class process the drop event. If accepted then check keyboard modifers. If not ctrl modifier, i.e. if move, then use the event source to find the source widget and call remove on the source widget.
  • Rest API for mysql database on qt

    Unsolved
    6
    0 Votes
    6 Posts
    624 Views
    SGaistS
    It depends on your needs and budget.
  • qt-everywhere-5.15.1 build from source fails install phase

    Unsolved
    2
    0 Votes
    2 Posts
    341 Views
    SGaistS
    Hi, In fact, it did fail. Try again without the -j option to see exactly where it started to fail.
  • QString to C string -> Fortran

    Unsolved
    13
    0 Votes
    13 Posts
    1k Views
    aha_1980A
    Hi @gibbogle, Glad to hear that. So please mark this topic as SOLVED too. Thanks!
  • More std lib function

    Locked Unsolved
    2
    0 Votes
    2 Posts
    149 Views
    Christian EhrlicherC
    Double post ( https://forum.qt.io/topic/119905/using-more-standard-library-function ) - closed
  • RemoteObject heartbeat doesn't work when using external TCP connection

    Unsolved
    1
    0 Votes
    1 Posts
    131 Views
    No one has replied
  • How can I remove rows from QComboBox?

    Unsolved
    3
    0 Votes
    3 Posts
    634 Views
    T
    @mrjj Thank you :) Only one more question. How can I add items to model not using vector? Something like that: for(auto text: itemsText) { QStandardItem *tmp = new QStandardItem(text); tmp->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled); tmp->setData(Qt::Unchecked, Qt::CheckStateRole); itemModel->setItem(itemModel->rowCount(),0,tmp); } EDIT: And one more: What with QPushButtons in model? Have I delete them?
  • std::transform over QMap

    Unsolved qmap stl transform
    13
    0 Votes
    13 Posts
    4k Views
    SGaistS
    Hi, You can use QMap:: keyValueBegin and QMap::keyValueEnd for your use case.
  • Script from QMAKE_SUBSTITUTES with execute permissions

    Unsolved
    1
    0 Votes
    1 Posts
    168 Views
    No one has replied
  • QGraphicsView doesn't repaint correctly after scrolling with overwritten paintEvent

    Solved
    16
    0 Votes
    16 Posts
    2k Views
    mrjjM
    @dporobic Hi yes, it switches from partial/clever updating to full redraw. So it might have performance complications with a huge number of items. You can test with the 40000 example and see how much/if it matters. https://doc.qt.io/qt-5/qtwidgets-graphicsview-chip-example.html
  • larger emoji symbols

    Unsolved font qml emoji
    1
    0 Votes
    1 Posts
    583 Views
    No one has replied
  • 0 Votes
    5 Posts
    778 Views
    Bruce.ZhangB
    Thanks, @JonB , I'll have a try, and respond later.
  • QT_FORWARD_DECLARE_CLASS(ClassName). How?

    Solved
    14
    0 Votes
    14 Posts
    3k Views
    B
    @jsulm Got it, now. Thx. This is what I've got forgotten.
  • Image Scaling Example freezes (qt concurrent issue)

    Solved
    4
    0 Votes
    4 Posts
    371 Views
    C
    This bug has been resolved in Qt 5.15.1.
  • QLibrary: isLoaded() not matching!

    Solved
    3
    0 Votes
    3 Posts
    385 Views
    B
    @fem_dev To get a right result of isLoaded() you must call load() before it! I think that's not true, the result of isLoaded() is right during the whole time. When you haven't called load(), it is not loaded, so isLoaded() should return false.
  • Crash with QFontMetrics::elidedText

    Unsolved
    11
    0 Votes
    11 Posts
    683 Views
    Christian EhrlicherC
    To be more precise: you're failing to due std::make_pair: "The deduced types V1 and V2 are std::decay<T1>::type and std::decay<T2>::type" So either use return std::pair<int, const QFontMetrics &>(width, metrics); or since you prefer (although very very inconsistent) brace initialization return {width, metrics};
  • Source and Build directories

    Unsolved
    3
    0 Votes
    3 Posts
    241 Views
    SGaistS
    Hi, What ROS documentation are you following ? They describe how to integrate their Qt Creator plugin here. @Bonnie ROS is for Robot Operating System even if it's not an OS. It's a middleware that provides several services like message-passing, package management, hardware abstraction, etc. in the robot world.
  • Strange errors from paintEngine

    Solved
    14
    0 Votes
    14 Posts
    1k Views
    D
    @mrjj - Again, thanks very much for this suggestion. Solved my problem immediately. Had I been aware of this in the past, I would have addressed several glitches much more easily. Will now be a standard part of my toolkit. As is too often the case, it solved my immediate problem, but now has me curious why I only now discovered that I should have been aware of the underlying problem long ago. Detailed info follows. It is often the case that the out-of-the-box QWidgets don't offer quite the capabilities I expect, so I've put wrappers around several to better meet my expectations. In this particular case, I wanted to intercept a couple of QEvents to process on my own while passing the bulk of QEvents on to Qt. I've done this for about a dozen QWidgets, including QLineEdit and QTextEdit. My version of the former I use a lot, the latter much less often. My mistake was that for all such wrapper widgets, I passed the intercepted to QWidget, not specifically to QLineEdit or QTextEdit as I should have. In any event, Qt was quite unhappy that I passed events intended specifically for QTextEdit to QWidget. I'm not surprised that this mistake would lead to unexpected outcomes. I am surprised that doing so for QTextEdit led to such different outcomes that QLineEdit, QLabel, QPushButton, QDateEdit, QSpinBox, QCalendar, QComboBox, etc.
  • how to get "preferred" ip4 address?

    Unsolved
    4
    0 Votes
    4 Posts
    441 Views
    Pl45m4P
    @davecotter said in how to get "preferred" ip4 address?: but there's no way to determine user-configured service order. I guess, yes. It seems that you can not access this value. Probably there are other libs or extensions for that, but then you have to deal with multi platform issues, since they are mostly for one platform only, if there are any.