Skip to content
QtWS25 Last Chance
  • Sqlite nested select

    Unsolved General and Desktop sqlite3 nes select
    4
    0 Votes
    4 Posts
    369 Views
    JonBJ
    @GeorgiosKoropoulis If you want to use whatever SQLite constructs in queries you have, like INSERT OR IGNORE INTO ... or SELECT ... FROM/VALUES (SELECT ... FROM), you can but you have to build the text of the query yourself. In this case you may find that binding does not work (that is supported by the driver, so depends what that allows for binding), but you can build that yourself into the text of the query without using binding. Just beware of correct syntax (e.g. quoting) and SQL injection.
  • 0 Votes
    9 Posts
    2k Views
    Christian EhrlicherC
    Name your buttons in designer radioButton_X with X as your id, use a loop in your code to add them to QButtonGroup later on: QButtonGroup *bg = ... for (int i = 1; i <= maxCount; ++i) { auto button = findChild<QRadioButton*>(QString("radioButton_%1").arg(i)); if (button) { bg->addButton(button, id); } else { qWarning() << "Something went wrong"; } } or directly address them const auto buttons = { ui->radioButton_1, ui->radioButton_2, ... }; int id = 1; for (auto button : buttons) bg->addButton(button, id++);
  • Ask for help (maybe) in query.value(0).

    Solved General and Desktop qsqlquery mysql select
    4
    0 Votes
    4 Posts
    1k Views
    Pradeep KumarP
    hi, @LuAria , wat ws the value coming in Numtwo ?. Nways ur got solution. Happy coding. Thanks,
  • QWebEngineView problems with <select> fields

    Unsolved QtWebEngine webengineview select
    2
    0 Votes
    2 Posts
    1k Views
    L
    @l2pd said in QWebEngineView problems with <select> fields: I'm having this problems on a Windows 10 x64 machine. I didn't tried it on linux. Sorry I forgot to mention that I have this problems with version 5.7.0 of Qt.
  • 0 Votes
    3 Posts
    8k Views
    oblivioncthO
    @SGaist Thank you. That seemed to be the last missing piece. It does what I want now.
  • QTableWidget not showing SQL Query.

    Solved General and Desktop qtablewidget sql query select
    10
    0 Votes
    10 Posts
    6k Views
    cxamC
    @mrjj Ok so, it seems that it doesn't detect the table "usuarios" even though it's there... So in my sqlite editor I executed the command and it worked properly: http://s18.postimg.org/iqry91pmx/image.png EDIT: I solved that problem: the program was searching the db in the remote directory not in the real directory, now it doesn't says any error but It doesn't shows the information. I've tried (SELECT * FROM usuarios) but nothing, it doesn't works. 2ND EDIT: I solved the problem, it was on my printing method, I tried a much simpler methor by doing: int i=0; while (query.next()) { ui->tableWidget->setItem(i,0,new QTableWidgetItem(query.value(0).toString())); ui->tableWidget->setItem(i,1,new QTableWidgetItem(query.value(1).toString())); ui->tableWidget->setItem(i,2,new QTableWidgetItem(query.value(2).toString())); i++; ui->tableWidget->insertRow(i); } Thank you for your help.
  • 'SELECT' was not declared in this scope

    Solved General and Desktop select sql qsqlquery
    3
    0 Votes
    3 Posts
    2k Views
    cxamC
    @alex_malyu Thanks a lot