Skip to content

Brainstorm

Stuck? Some ideas just need to be dumped on someone before they can materialize.
456 Topics 3.2k Posts
  • Changing ABI doesn't modify effective qmake call

    Unsolved
    3
    1 Votes
    3 Posts
    963 Views
    JKSHJ
    Hi @Bradyok, and welcome! Yes, it's a bug in Qt Creator 11.0.2: https://bugreports.qt.io/browse/QTCREATORBUG-29506 It will be fixed in v11.0.3. In the meantime, you can install and use v11.0.1: https://download.qt.io/official_releases/qtcreator/11.0/11.0.1/ or use @S_M_R's workaround
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • Qt for thin GUI client

    Unsolved
    8
    0 Votes
    8 Posts
    1k Views
    V
    @SimonSchroeder Thanks so much for the suggestions everyone, I truly value the input from others that are most definitely more talented than myself.
  • Call to QMessageBox::exec or show logs out from my acct in ubuntu18

    Unsolved
    3
    0 Votes
    3 Posts
    538 Views
    jsulmJ
    @Podugu You should also check Linux logs (dmesg for example). It really looks like your desktop session is terminated for some reason (I guess something is crashing). What graphics hardware and driver do you use?
  • controls that don't really "control"

    Solved
    5
    0 Votes
    5 Posts
    948 Views
    mzimmersM
    @TomZ said in controls that don't really "control": My personal advice on the usecase where getting a new state may take more than 200ms is to have your datamodel update the state after 250ms to "waiting-for-state-B" or something (use a timer) and then the front-end can show the 3rd state, indicating that its busy doing what you requested. I agree completely -- it's just a little hard to figure out how to do this with a Switch. EDIT: I got my issue with the Switch figured out - it wasn't so much a state problem as it was my lousy model implementation (explained in painful detail elsewhere in the forum). Thanks to all for the help.
  • Insight Web Console in WebAssembly

    Unsolved
    2
    0 Votes
    2 Posts
    441 Views
    lorn.potterL
    It probably could be built using Qt WebAssembly, as it looks to be javascript based.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • kmap2qmap

    Unsolved
    12
    0 Votes
    12 Posts
    2k Views
    SGaistS
    @myneur The us.kmap from that link is valid. However, it does also generate around 40 warnings as the other two do. Do you still need the qmap files ?
  • Some advice for a table application

    Unsolved
    4
    0 Votes
    4 Posts
    783 Views
    M
    @Hannibal said in Some advice for a table application: What about the first and last columns, should I merge the cell for have the same look as pics? https://forum.qt.io/topic/123343/qtableview-qtablewidget-cell-span-range Search the web and this forum, there's numerus topics on this.
  • displaying only part of model

    Solved
    6
    0 Votes
    6 Posts
    965 Views
    mzimmersM
    @SGaist maybe it's because I'm old school, or maybe it's because I have enough trouble reading other people's code, but...whatever the reason, I prefer to explicitly derive a function's return value, assign it to a variable, and return that variable. I realize it accomplishes nothing, and in the absence of a good optimizing compiler, is actually fractionally slower, but...it's just how I roll.
  • identifying signal senders

    Solved
    17
    0 Votes
    17 Posts
    4k Views
    mzimmersM
    @TomZ I ended up taking Jeremy's suggestion, and it works beautifully. Keeps the message manager self contained and no need for state awareness.
  • This topic is deleted!

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

    Unsolved
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • Which QT framework for dashboard of ship

    Unsolved
    4
    0 Votes
    4 Posts
    923 Views
    SGaistS
    That's good to know. In that case, depending on the fanciness you want, Qt Quick is still a good option as it allows for more visual effects and they would be easier to implement than with widgets. Otherwise the graphics view framework will also be of interest. On what kind of device will your dashboard run ? KDAB has built something for boats.
  • Implementing many-to-many relationships

    Solved
    40
    0 Votes
    40 Posts
    13k Views
    TomZT
    @mzimmers said in Implementing many-to-many relationships: Doesn't seem to me that I'd need new/delete anyway, but I do agree that it seems preferable to: create and maintain a map of Equipment objects (or structs) with a UUID as the key in the Activity object, maintain a list of Equipment UUIDs. Is this what you had in mind? The various comments here went towards using pointers to instances of classes as the relationship. Can't use a raw pointer (safely) without 'new'. If your only objects are the Equipment and the Activity, then yeah, that's pretty simple. as this got confusing, here is a very quick and dirty mockup I just wrote in 5 minutes. Apologies for the roughness. struct PActivity; struct PEquipment; class ManagerPrivate { public: std::map<int, PActivity> m_activities; std::map<int, PEquipment> m_equipments; int m_lastAssignedId = 0; }; struct PActivity { QString name; }; struct PEquipment { QString name; std::deque<int> activities; }: class Manager { public: ManagerPrivate *d; Activity createActivity(); }; // ---- class Activity { public: explicit Activity(Manager *parent, int n); Activity(); // gives invalid instance. bool isValid() const { return d && n; } QString name() const { assert(isValid()); auto i = d->m_activities.find(n); assert(i != d->m_activities.end()); return i->name; } void setName(const QString &name) { assert(isValid()); auto i = d->m_activities.find(n); assert(i != d->m_activities.end()); i->name = name; } int id() const { return n; } private: ManagerPrivate *d = nullptr; int n = 0; }; class Equipment { explicit explicit(Manager *parent, int n); explicit(); // gives invalid instance. bool isValid() const; QString name() const; void setName(const QString &name); void addActivity(const Activity &a) { assert(a.isValid()); assert(isValid()); auto i = d->m_equipments.find(n); assert(i != d->m_equipments.end()); i->activities.push_back(a->id()); } private: ManagerPrivate *d = nullptr; int n = 0; }
  • 0 Votes
    2 Posts
    430 Views
    Kent-DorfmanK
    in my 30+ years of experience taking over someone elses app usually means throwing it out the nearest airlock and doing it from scratch "correctly". The previous owner never knew what the tar they were doing. LOL
  • need suggestions for transition/animation of banner

    Solved
    7
    0 Votes
    7 Posts
    939 Views
    mzimmersM
    @sierdzio yes, that seemed to fix it. Item { id: banner property int bannerHeight: 80 implicitHeight: (opMode.mode === OpModes.Service) || (navBar.tabIndex === 3) ? bannerHeight : 0 Behavior on implicitHeight { NumberAnimation { duration: 250 } } Layout.fillWidth: true Rectangle { id: rect anchors { left: parent.left right: parent.right } implicitHeight: parent.implicitHeight ... } } I think I need to apply a similar animation to the opacity of the contents of the Rectangle (a couple lines of text and a Button), but I get the principle now. Thanks to all for the help.
  • Update C++ list model from QML

    Solved
    11
    0 Votes
    11 Posts
    3k Views
    ChronalC
    You can use a QAbstractListModel to update the list model from QML. The QAbstractListModel provides an interface for accessing data from a list of items. It can be used to update the list model from QML by using the setData() method. To update the list model from QML, you will need to create a QAbstractListModel subclass and implement the setData() method. The setData() method should take the index of the item to be updated and the new value for the item. You can then call the setData() method from QML to update the list model. For example, if you have a list of strings, you can create a QAbstractListModel subclass and implement the setData() method as follows: void MyListModel::setData(const QModelIndex &index, const QVariant &value, int role) { if (index.isValid() && role == Qt::EditRole) { int row = index.row(); QStringList list = data(index, Qt::DisplayRole).toStringList(); list[row] = value.toString(); setData(index, QVariant::fromValue(list), Qt::DisplayRole); } } You can then call the setData() method from QML to update the list model. For example: MyListModel { id: myListModel // ... } Button { text: "Update List Model" onClicked: { myListModel.setData(myListModel.index(0, 0), "New Value", Qt.EditRole); } } This will update the first item in the list model with the new value.
  • What kind of overviews do you miss in the Qt documentation?

    Unsolved
    20
    2 Votes
    20 Posts
    3k Views
    T
    Qt samples are not large enough. Include a few Qt-based open source applications and provide detailed step-by-step instructions.
  • Register a Qt account twice

    Unsolved
    2
    0 Votes
    2 Posts
    605 Views
    SGaistS
    Hi, You should open a ticket about that matter in your Qt account page. This is a user forum and there you need the Qt Company admins help.