Skip to content

Brainstorm

Stuck? Some ideas just need to be dumped on someone before they can materialize.
440 Topics 3.2k Posts
  • QT SQL query loop?

    Unsolved
    8
    0 Votes
    8 Posts
    3k Views
    JonBJ

    @davethedave
    Firstly, I don't work in C++ so I don't test the code for the right way to pass the output string to printf(). So your corrections are good. [BTW you'd be better off not using printf() and using Qt/C++ functions, then you wouldn't have all that toUtf8().constData() stuff, but that's another matter.]

    As you can see you have 3 rows matching the query, you tell us you have 5, or you had 5 and now you have 3. That's worrying when you're asking for help. Your Username value appears to be 1 from the output. That is a strange username. I don't know what your problem is. The original code should correctly print out whatever is in the Username column of each row encountered (note that since you didn't put a \n in it will all come on one line, which isn't great, I do trust that is not what this is all about.)

  • Streaming file content from webserver or something?

    Unsolved
    15
    0 Votes
    15 Posts
    3k Views
    SGaistS

    You can get get the hex values with QByteArray::toHex.

  • Read line and store info?

    Solved
    4
    0 Votes
    4 Posts
    976 Views
    JonBJ

    @davethedave
    In addition to what @VRonin has shown, if your lineusername/linepassword are, say, QLineEdits, you cannot assign via text() = ... as you tried in yours, you'll want to use setText(). [EDIT As @VRonin 's example now shows.]

  • Extremely stuck with passing two arguments to slot

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    D

    @J.Hilk

    Thank you so much! your solution works perfectly!

    What an amazing helpdesk

  • adding CUDA to Qt

    Solved
    4
    0 Votes
    4 Posts
    7k Views
    M

    It turned out that making cuda.conf file in /etc/ld.so.conf.d containing path to cuda libs directory and running ldconfig solved my problem.

  • QAbstractItemModel::setItemData partial success

    Moved
    18
    0 Votes
    18 Posts
    4k Views
    VRoninV

    @kshegunov said in QAbstractItemModel::setItemData partial success:

    try pinging the list

    I won't even try pinging it before September, don't worry. It was more to keep the 3 channels (forum/gerrit/mailing list) aware of each other

  • QTimer not emitting timeout signal

    Unsolved
    8
    0 Votes
    8 Posts
    3k Views
    J.HilkJ

    @Channareddy
    you ccould use a QTime or QElapsedTimer instance and check each whileloop iteration the elapsed value

  • best practices: I'm doing it wrong

    Solved
    40
    1 Votes
    40 Posts
    9k Views
    mzimmersM

    Clever...very clever. So, to summarize:

    it's generally a good idea to perform editing in a separate window/dialog. create this window with new->Qt Designer Form Class; this create everything at once. use the QDataWidgetMapper in the edit dialog to display the details from the model. use VRonin's technique of setting the model index for the edit dialog by using the index from the parent window.

    I'll edit the summary if anyone informs me of errata. Thanks for all the assistance.

  • To Mutex or not to Mutex

    17
    0 Votes
    17 Posts
    5k Views
    J.HilkJ

    @kshegunov said in To Mutex or not to Mutex:

    @J.Hilk said in To Mutex or not to Mutex:

    As long as the While loop is running the event loop of the thread is "on halt" therefore no Signals are emitted/received during that time.

    Emission of signals is not affected by a blocked event loop. Only the execution of the slot connected to the signal if the receiving object's thread's event loop is blocked. :)

    😱
    0_1530014535045_79493d01-0a82-489b-a52e-b4f34fc079ba-image.png

  • suggestions for repeating display views

    Solved
    36
    0 Votes
    36 Posts
    9k Views
    VRoninV

    @mzimmers said in suggestions for repeating display views:

    I was thinking to use a combo box for the MAC address.

    Then it's just a small change to the connect statement:
    connect(combo,QOverload<int>::of(&QComboBox::currentIndexChanged),mapper,&QDataWidgetMapper::setCurrentIndex);

  • 1966 Ford Pickup Qt Custom Raspberry Dash Idea.

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    Pablo J. RoginaP

    @EatonCode what about OpenAuto project?

  • need ideas for list/table implementation

    Solved
    57
    0 Votes
    57 Posts
    14k Views
    mzimmersM

    Perfect. Thanks for the help on threads.

    And speaking of threads, this one has gone afield enough that I think it's best to consider it finished. Thanks to everyone who provided input on this.

  • 0 Votes
    4 Posts
    2k Views
    V

    The most compatible with qt is GE Predix (https://www.predix.io/) - https://github.com/IndeemaSoftware/QPredix

  • GPL licensing and Contributor Licensing Agreement

    Moved Unsolved
    2
    0 Votes
    2 Posts
    893 Views
    JKSHJ

    Hi, and welcome to the Qt dev net!

    @Znalazca said in GPL licensing and Contributor Licensing Agreement:

    Recently I finished a project. I want to publish it as open source under GNU GPLv3 license. I want to be an owner of whole source code including possible future contributions of other people.

    Do you want to be the owner, or just an irrevocable license to use contributed code?

    With the Qt Project, the contributor retains copyright of the code. The contributor just grants the Qt Project the right to use the code as they see fit.

    I suppose that there may be some 'universal' CLA texts written by lawyers for individuals but I haven't found anything.

    Could you recommend me some CLA text for my purposes? I appreciate any help.

    I'm not aware of any such universal CLAs either.

    If you're interested, here is the Qt Project's CLA: https://www1.qt.io/contributionagreement/

  • Distributed Database Maintenance

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    SGaistS

    Hi,

    This PostgreSQL wiki page about replication and clustering might be a good starting point.

  • 0 Votes
    6 Posts
    2k Views
    R

    Thank you very much for your answers, because they have been very useful to solve a problem within my application.

  • Controlling UVC Complaint camera using Qt(Windows)

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

    Moved Unsolved
    9
    0 Votes
    9 Posts
    203 Views
  • QAbstractItemModel::dataChanged what would you prefer?

    Solved
    9
    0 Votes
    9 Posts
    3k Views
    VRoninV

    @JKSH said in QAbstractItemModel::dataChanged what would you prefer?:

    I'd just choose the option that requires simpler code (which I think is Flavour 1)

    it's actually flavour 2 in my case as I would have to check that the two indexes are one next to the other while I don't care using flavour 2

    @Christian-Ehrlicher said in QAbstractItemModel::dataChanged what would you prefer?:

    When you look at the default implementation you will see that the second one is better:

    Ok, this is a show stopper. I did not realise sending topLeft!=bottomRight (often) triggers a repaint of the entire view. This makes flavour 2 strictly better

    Thanks everyone for your insight

  • What exactly is McCabe cyclomatic complexity?

    Unsolved
    2
    0 Votes
    2 Posts
    989 Views
    K

    The only adequate metric of code complexity is "WTF per minute" :)