Skip to content
QtWS25 Last Chance
  • 0 Votes
    12 Posts
    1k Views
    ChabaC
    @SGaist My data is ready to append. So i append them directly. There are 10-100 QTextEdits. I append 100-200 line to each of QTextEdits. Lines have arround 300 characters. I have one vector of vectors source. By the way, i moved my data source to a different thread. Then emitted signals to append with BlockingQueuedConnection. Gui is responsive now. But its not smooth. I dont know using blockingqueuedconnection instead of queuedconnection is the right way but my gui is responsive while appending strings now.
  • Adding salt to hashing in C++ - looking for library

    Solved C++ Gurus c++ qt hash
    15
    0 Votes
    15 Posts
    3k Views
    S
    A quick look on bcrypt's webpage tells me this is not a library, but a program. If you want to have it as a library, there is not support for this out of the box. You need to figure it out by yourself. The general instructions for building are to use make. (Usually, nmake is the equivalent on Windows.) I don't see any instructions for Windows on the webpage. You'll have to look through the README's, etc. to figure it out. cmake and qmake will not help as these will just generate makefiles and not compile anything. However, there is already a makefile, so you don't have to run cmake or qmake to create them.
  • QQuickItem::mousePressEvent() not called

    Unsolved QML and Qt Quick c++ qt c++ quicckitem
    1
    0 Votes
    1 Posts
    269 Views
    No one has replied
  • Deserializing QSqlQuery using submethod in efficient way

    Unsolved C++ Gurus c++ qt mysql
    6
    0 Votes
    6 Posts
    845 Views
    SGaistS
    No it's not, you can see that with its constructors that take a QSqlDatabase parameter. No clear is not called, the destructor is. There's no need to create QSqlQuery objects on the heap.
  • Undefined behaviour of QDate when converted to string

    Solved General and Desktop qdate c++ qt
    2
    0 Votes
    2 Posts
    410 Views
    mrjjM
    Hi If the database table type is of type date, it wont like a string formatted as SunFeb2020 so you need to match the toString format to the one expceted by the DBMS.
  • QTNationaldex

    Unsolved Showcase pokemon c++ c++ qt pokedex
    2
    3 Votes
    2 Posts
    658 Views
    mrjjM
    Hi Thank you for sharing. I don't know anything about Pokemon but its cool you used gif so they are animated and the code looks clean and structured.
  • Reading UART (RS485) with Qt

    Unsolved Mobile and Embedded c++ qt serial port serialport-byte
    8
    0 Votes
    8 Posts
    2k Views
    SGaistS
    @RunThiner There's no need for such a loop. QSerialPort already provides an asynchronous API and if you really want to wait for data to be available, there's a blocking API for that as shown in the QSerialPort details.
  • 0 Votes
    5 Posts
    870 Views
    jsulmJ
    @rohit1729 You should read this first: https://doc.qt.io/qt-5/signalsandslots.html void panelB::mouseMoveEvent(QMouseEvent *eventMove) { QString txt; txt = QString("(X:%1,Y:%2)").arg(eventMove->pos().x()).arg(eventMove->pos().y()); emit coordinatesChanged(eventMove->pos().x(), eventMove->pos().y()); //qDebug() << txt; } coordinatesChanged would be the signal.
  • GUI freezing issue

    Unsolved Mobile and Embedded gui qthread c++ qt opencv serial interfac
    3
    0 Votes
    3 Posts
    1k Views
    D
    @Gojir4 thanks, I am trying that right now. I’ve added a 1s delay in my image grabbing thread. Let’s see. Fingers crossed!
  • 0 Votes
    37 Posts
    6k Views
    mrjjM
    Hi You can use https://doc.qt.io/qt-5/qgraphicsitem.html#qgraphicsitem_cast and try cast to your child type if it really is, you can then use its members. so check for NULL and note the docs saying " reimplement the type() function"
  • 0 Votes
    2 Posts
    700 Views
    M
    @magicstar I have the same problem. Have you find a solution ?
  • 0 Votes
    5 Posts
    605 Views
    JKSHJ
    @VRonin said in how to Improve visual and add efects to Qt c++ apps for desktop: P.S. and mi instalation folder size is 12gb Checking everything in the installer is never a good idea. only install the version that matches your compiler +1 See the warning at the bottom of Page 2: https://1drv.ms/w/s!AnaQjhA33g0K0lkIZPVjfsWrcPSI ("Warning: Be sure to only select the build(s) that you want. If you simply tick the version number, you will select and install all available builds, which can take up many 10s of gigabytes! This is especially important on Windows.")
  • 0 Votes
    10 Posts
    2k Views
    O
    @jsulm You were right. I finally understood what you meant by getting the db at any time. Thank you very much for your help! This is my working code: #include "f1_system.h" #include <QtSql/qsqldatabase.h> #include <QtSql/qsqlquery.h> #include <QtSql/qsqlerror.h> #include <QtSql/qsqldriver.h> F1_System::F1_System(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); QSqlDatabase db = QSqlDatabase::addDatabase("QODBC", "dataB"); QString connectionString = "Driver={SQL Server};Server=DESKTOP-4K9MAS2\\SQLEXPRESS01;Database=Formula1_BD;Trusted_Connection=yes;"; db.setDatabaseName(connectionString); connect(ui.loginPushButton, SIGNAL(clicked()), this, SLOT(validateLogin())); } F1_System::~F1_System() { QSqlDatabase::database("dataB").close(); } void F1_System::validateLogin() { if (QSqlDatabase::database("dataB").open()) { QString selectUser("SELECT Username FROM Users WHERE Username = '" + ui.usernameInputField->text() + "' AND Userpassword = '" + ui.passwordInputField->text() + "';"); QSqlQuery qry(selectUser, QSqlDatabase::database("dataB")); if (qry.next()) ui.label->setText("Status: You are logged in!"); else ui.label->setText("Status: Wrong credentials!\nTry again!"); } else ui.label->setText("Failed to connect to the database!"); }
  • 0 Votes
    4 Posts
    2k Views
    Andy314A
    @Ovidiu_GCO {SQL Server Native Client 17.0 }; What is with the blank in front of "}"
  • Do not draw a QTableView

    Unsolved General and Desktop qtableview c++ qt
    3
    0 Votes
    3 Posts
    615 Views
    D
    @JonB This adds a new, blank row at the end of the table model. But you do not set that row to hold your component / text? How to do it? I did not correctly understand what this function does, so if it's not hard for you. You can suggest how to insert text in the first free cell
  • 0 Votes
    22 Posts
    15k Views
    A
    @Nico1564 said in How to draw on Image loaded in a QGraphicsView: Yeah i know that this work but i need to draw with fonctions. I successed to do that but I don't want to have the GraphicsView at the beginning of the program, and i want to add draws like an Ellipse (and the image) when i click on buttons. These lines could just as well happen inside a button click QGraphicsEllipseItem* testItem = new QGraphicsEllipseItem(20,30,120,70,0); m_pScene->addItem(testItem); In that case, you would create an ellipse every time you pressed that button. I don't quite understand the "I don't want to have the GraphicsView at the beginning of the program" - maybe you could elaborate on that.
  • 0 Votes
    5 Posts
    2k Views
    SGaistS
    Sounds rather like a job for libusb
  • Qt3D Animation C++

    Unsolved General and Desktop c++ qt qt3d c++ 3d model animation
    7
    0 Votes
    7 Posts
    3k Views
    O
    @Lukadriel Hi, One year passed and still waiting for the proper example. Did they give any tips?
  • QListWidgetItems causing memory overhead

    Solved General and Desktop c++ qt
    14
    0 Votes
    14 Posts
    3k Views
    O
    @kshegunov I see now, that answers my question. Thanks.