Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • QT App with SQLITE Database (Query max records ~512)

    Unsolved
    4
    0 Votes
    4 Posts
    329 Views
    Christian EhrlicherC
    It's QSqlQueryModel which has an internal pagination. Search the forum for QSqlQueryModel and you will find some threads about this.
  • ixxat and qt

    Unsolved
    4
    0 Votes
    4 Posts
    780 Views
    M
    What OS are you using? If you are working on windows i highly suggest getting a PEAK can adapter instead. On linux if you follow IXXAT's documentation for installing socketcan drivers then it will work easily with QCanBus.
  • Load Google chrome cookie file in QWebEngineCookieStore

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

    Unsolved
    7
    0 Votes
    7 Posts
    20 Views
  • Porting an application on Ubuntu

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    J
    @SGaist said in Porting an application on Ubuntu: Hi, How did you install Qt on both these machines ? I installed it on Ubuntu. The problem is on Ubuntu. I have Qt installed on another machine on Debian (for RPi) and on this installation the widget application runs without problems. I found the solution. During the installation I broke the GPU driver libraries, so this helped sudo apt install --reinstall mali-x11
  • how to capture desktop screen with its mouse cursor?

    Unsolved
    2
    0 Votes
    2 Posts
    239 Views
    jsulmJ
    @Simon-ZanG Documentation says: "The mouse cursor is generally not grabbed", so you're out of luck with Qt here. "are there any APIs to do that" - I think you will have to look into native APIs for that.
  • Error for include file in QtTest

    Solved
    4
    0 Votes
    4 Posts
    285 Views
    sierdzioS
    Can you share your test file? Perhaps you are using/ not using correct main-generating macro?
  • How to Send Data from One Ui to Another

    Unsolved
    2
    0 Votes
    2 Posts
    250 Views
    jsulmJ
    @delivite Make your slot public, not private
  • Notification on mysql insert

    Unsolved
    2
    0 Votes
    2 Posts
    279 Views
    Christian EhrlicherC
    You should check if the sql driver supports this feature: https://doc.qt.io/qt-5/qsqldriver.html#DriverFeature-enum (hint: mysql does not support it - so it's not possible)
  • undefined reference error in Qt Test project.

    Unsolved
    2
    0 Votes
    2 Posts
    177 Views
    Christian EhrlicherC
    So did you actually implement this ctor and include the source of it in your project?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • READ DATA FROM SPECIFIC UDP ""PORT""

    Unsolved
    3
    0 Votes
    3 Posts
    456 Views
    Kent-DorfmanK
    Try your original code with the address of 0.0.0.0 I believe you may need privilege to bind to a specific interface.
  • VPN integration

    Solved
    2
    0 Votes
    2 Posts
    180 Views
    JKSHJ
    @Ryna said in VPN integration: it gives me uncountable linking errors. You must tell your linker where to find the libraries. See https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html
  • QGraphicsPathItem anti collision with other items

    Unsolved
    1
    1 Votes
    1 Posts
    112 Views
    No one has replied
  • 0 Votes
    4 Posts
    636 Views
    SGaistS
    Hi, There's currently no possible workaround with a single QDataWidgetMapper. The internal logic does not handle multiple "same source widget".
  • Error indexing a QGenericMatrix

    Solved
    12
    0 Votes
    12 Posts
    952 Views
    Pl45m4P
    @viniltc Why you need the inverse of the resulting quaternion in step 3? I've never done gravity compensation before, but I think it may works like suggested here: https://stackoverflow.com/questions/18252692/gravity-compensation-in-accelerometer-data https://stackoverflow.com/questions/12617200/remove-gravity-from-imu-accelerometer There are also some papers dealing with this topic. I would try to just subtract the gravity component (vector in Z - direction, let's say (0, 0, 9.81)) from your actual, accelerometer vector. Is the result vector after step 2 looking correct?
  • Get QDialog be its title (or name)

    Solved
    9
    0 Votes
    9 Posts
    807 Views
    mrjjM
    @Please_Help_me_D well even im so called experienced, it also took me a while to think in terms of signals and slot where i would normally have a pointer to "the other class" But it really is much better as the 2 classed dont even have to know each other and the slot will have direct access to the UI / widgets which outside pointer will not - so to send the data via a signal is good design in most cases. Also you can easily write a test object that you connect to instead and it can automatic send some test data. The ColorBarWidgetMain wont know the difference. So its a more decoupled Design which is good for maintenance and adding features as nothing breaks even if you change the dialog. it still just have to emit the signal and no other class needs to know about any internal changes.
  • Printing QTextDocument in different thread distorts image.

    Solved
    6
    0 Votes
    6 Posts
    523 Views
    A
    @gde23 said in Printing QTextDocument in different thread distorts image.: What I would try is something like this, but as I said its just a guess... void AbstractEcoForm::printDocument() { std::unique_ptr<QTextDocument> printDoc(new QTextDocument); std::unique_ptr<QPrinter> printer(new QPrinter); printDoc->setPageSize(QSizeF(printer->pageRect().size())); setDocumentData(printDoc.get()); printer->setPrinterName(mCurrentPrinter); QString numeDoc = QStringLiteral("Test-print"); printer->setDocName(numeDoc); QPrinterInfo printerInfo(*printer); if (printerInfo.isNull()) { emit printerError("Nu este setata nici o imprimanta!"); return; } if (!printer->isValid()) { emit printerError("Imprimanta setata nu este valida!"); return; } QTimer::SingleShot(10, this, SLOT(printTheDocument()); where printTheDocument() is a slot that calls the printDoc->print(printer.get()); of your original code And I'm back :D, seems while the code somehow works and the app doesn't crash I get the following warning: QObject: Cannot create children for a parent that is in a different thread. (Parent is QTextDocument(0x10f7a800), parent's thread is QThread(0x143b22b8), current thread is QThread(0x12e10d0) Edit:: I gave up on QtConcurrent and went with QueuedConnection connection. Thank you.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    48 Views
    No one has replied
  • Select whole row in QTableWidget when radio button is checked

    Solved
    12
    0 Votes
    12 Posts
    3k Views
    P
    @Christian-Ehrlicher Thanks for the suggestion. Still I consider a custom delegate an overkill for such simple functionality, as my table is fairly simple and it will not contain more than a dozen rows. @anil_arise Thank you for the code. I will try that too. In the meantime, I found a solution. The problem and the confusion was that when a radio button (or checkbox) is checked, two toggled signals are emitted -one for the radio button actually clicked and one for the previously checked radio button which changes to unchecked, as the buttons are set to autoExclusive. So, I worked with the model indexes and got the result I wanted (note that in the end I opted for a QCheckBox): void ServiceDialog::setActiveModel() { for (auto row = 0; row < ui->myTable->rowCount(); row++) { QCheckBox *box = qobject_cast<QCheckBox*>(ui->myTable->cellWidget(row,5)); if (box && box->isChecked()) { ui->myTable->setCurrentIndex(ui->myTable->model()->index(row,0)); ui->myTable->selectRow(ui->myTable->currentIndex().row()); theStringIwant = ui->myTable->item(ui->myTable->currentIndex().row(),0)->text(); break; } } ... }