Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • LNK2001 errors when trying to using CryptoPP lib in a Qt Project

    Solved
    2
    0 Votes
    2 Posts
    433 Views
    DSpiderD
    I finally solved this. It was due to the fact that I was building Crypto++ with MSVC2019 while Qt was built with MSVC2015
  • fatal error LNK1104 'kernel32.lib' & U1077

    Solved
    4
    0 Votes
    4 Posts
    855 Views
    M
    .. this solve, iam re instal msvc build tools, and copy shared folder to um..
  • Calling setFocus() in the constructor doesn't work

    Solved
    6
    0 Votes
    6 Posts
    928 Views
    JonBJ
    @LorenDB @Pl45m4 is correct: "focus" is only implemented when widget is shown, it doesn't have any meaning during, say, construction. showEvent() is the earliest you should set your focus.
  • How to develop better and more beautiful UIs in Qt

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    Kent-DorfmanK
    user interface design is a science unto itself. the widgets can do so much, but if you really want flare then plan on writing custom widgets and custom paint methods to do exactly what you're looking for.
  • Does QPainter tries to paint anything outside the size of paint device?

    Unsolved qpainter qimage
    2
    0 Votes
    2 Posts
    650 Views
    Kent-DorfmanK
    so write a test program, meter the performance of canvas writes vs out-of-bounds writes, and report back.
  • QTextStream - No data in File

    Solved
    8
    0 Votes
    8 Posts
    786 Views
    S
    Thankyou all for your help - it is working now. @Christian-Ehrlicher You put me on the right track. In another part of the application I had a bug that would reopen the file for writing !
  • Load balancing between several Threads

    Solved qthread qthreadpool
    6
    0 Votes
    6 Posts
    1k Views
    Christian EhrlicherC
    @Cocojambo said in Load balancing between several Threads: I mean that all 4 new threads may be created in one core and we won't get any benefit of such multi threading. You can't with Qt. But the OS will for sure not put all four threads on one core and leave the other three idle when the four have something to do.
  • 1 Votes
    8 Posts
    10k Views
    JonBJ
    @Joerg-Brueggmann That I don't know, you probably know more than I! My understanding is that once you use any stylesheet colors they override any palettes you might set in Qt styles. That's just how it is --- stylesheets are evaluated/act after everything else.
  • 0 Votes
    14 Posts
    4k Views
    JonBJ
    @VRonin said in problem with QLocalSocket sending continues data to QLocalServer: This is not correct. Damn, and sorry! I thought that it had said that, but not. I may have confused with readyRead() is not emitted recursively; if you reenter the event loop or call waitForReadyRead() inside a slot connected to the readyRead() signal, the signal will not be reemitted (although waitForReadyRead() may still return true).
  • QtBluetooth on Windows - working combination of Qt Version and Compiler

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    Christian EhrlicherC
    @chrizbee Qt does not mess up the system include paths... appending the include path or setting PATH I don't know what PATH should have to do with a compiler include path nor why I should add a default include path to my pro (or cmake) file - looks like your compiler setup is incorrect.
  • 0 Votes
    2 Posts
    1k Views
    JonBJ
    @rtvideo For the "not found", start from https://github.com/probonopd/linuxdeployqt/issues/350 https://github.com/probonopd/linuxdeployqt/issues/338 ? I have no idea whether those warnings are connected to your tabs issue.
  • Run Qt GUI application inside docker.

    Solved
    13
    0 Votes
    13 Posts
    27k Views
    D
    @Pablo-J-Rogina @mrjj Ok, setting virtual display with Xvfb :1 -screen 0 1024x768x16 & and setting variables: ENV QT_DEBUG_PLUGINS=1 ENV QT_QPA_PLATFORM=xcb ENV QT_QPA_PLATFORM_PLUGIN_PATH=/opt/Qt/${QT_VERSION}/gcc_64/plugins ENV QT_PLUGIN_PATH=/opt/Qt/${QT_VERSION}/gcc_64/plugins ENV DISPLAY=:1 solved everything! It finally works ! :) Thanks for yours interest!
  • UDP packets received only the first time.

    Solved
    13
    0 Votes
    13 Posts
    2k Views
    E
    OK, so i don't know exactly why but I got it working. I believe that the following were the problems: m_udpSocket->bind(QHostAddress::AnyIPv4, 4210) **instead of** udpSocket->bind(45454, QUdpSocket::ShareAddress); as mentioned in the broadcast receiver example connect(m_udpSocket, &QUdpSocket::readyRead, this, &Receiver::processPendingDatagrams); **instead of** connect(m_udpSocket, SIGNAL(readyRead()), this, SLOT(ReceiveData()), Qt::QueuedConnection); what i used in my initial application when posting for help while (m_udpSocket->hasPendingDatagrams()) { datagram.resize(int(m_udpSocket->pendingDatagramSize())); m_udpSocket->readDatagram(datagram.data(), datagram.size()); qDebug() << "Message: " << datagram.constData(); } **instead of** while (m_udpSocket->hasPendingDatagrams()) { QByteArray datagram; QHostAddress sender; quint16 senderPort; qDebug() << "2 "; datagram.resize(m_udpSocket->pendingDatagramSize()); m_udpSocket->readDatagram(datagram.data(), datagram.size(), &sender, &senderPort); qDebug() << "Message from: " << sender.toString(); qDebug() << "Message port: " << senderPort; qDebug() << "Message: " << **datagram;** //as per my initial program } Thank you all for all your involvement and support Regards Elian N.
  • 0 Votes
    18 Posts
    10k Views
    C
    @VRonin hi, I run the code sucess, how to keep baseEditor always display not that I should click the mouse.
  • How to display pages with poppler

    pdf poppler qt5
    8
    0 Votes
    8 Posts
    3k Views
    DrageFabeldyrD
    @JonB oh, sorry, didn't recognized the link, this article i've read already i work with astra linux, it has poppler and i hope that's enough for my task
  • aboutQt in Qt4.8 web links don't work anymore

    Solved
    3
    0 Votes
    3 Posts
    220 Views
    O
    Thank you very much for the quick answer. I was afraid of that.
  • Wrong kit for Qt 6.0.0 MSVC2019 64bit

    Solved qt6 msvc2019 kits kit setup windows
    13
    0 Votes
    13 Posts
    4k Views
    G
    https://bugreports.qt.io/browse/QTBUG-87735 bug fixed) Fix Version/s: 6.0.0 RC
  • database error

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    JonBJ
    @fkaraokur I am lost as to where you are at now. Do you have some path working where it picks up an existing database as you desire, or is it still not finding any database and is creating a new one each time? If you are saying it is working for you by putting the database into some directory like build-BIST-Desktop_Qt_5_15_1_MinGW_64_bit-Debug, you really should read what we have all said above. This is just not the right place to put a database file. For example, it won't work once you compile for Release, it won't exist if anybody but you runs the program, and if you did distribute your application read/writing a database in the same directory as the executable will at best be a bad idea and at worst be forbidden.
  • SQL data extraction error

    Unsolved
    2
    0 Votes
    2 Posts
    174 Views
    Christian EhrlicherC
    You have to call QSqlQuery::next() as explained in the documentation.
  • How to elided text of all comboBox items?

    Unsolved
    4
    0 Votes
    4 Posts
    875 Views
    B
    Item delegates only works on item views, in your case, the popup view of the combo box. If you want to change the painting of combo box's current text, then it must be done in paintEvent() of the combo box. If you are talking about the items in the popup view, then I don't understand because they should be elided by default. (If you use your own item view, check QAbstractItemView::textElideMode.)