Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.3k Posts
  • Opengl and PGM display

    Unsolved
    1
    0 Votes
    1 Posts
    150 Views
    No one has replied
  • 0 Votes
    13 Posts
    6k Views
    oblivioncthO
    My behavior correction patch for this one has also gone through to be available in 6.0/the current dev build https://codereview.qt-project.org/c/qt/qtbase/+/312083 Cheers.
  • How to check network status?

    Unsolved
    2
    0 Votes
    2 Posts
    978 Views
    sierdzioS
    Some platforms (Android) have a native API for this. A rock-solid (and quite wasteful) solution for all platforms is to ping a well-known server like Google (or your own server if you have one) periodically. If the connection does not work, you know that there is no Internet access.
  • QSerialPort blocks when open() called

    Solved
    11
    0 Votes
    11 Posts
    839 Views
    B
    @kuzulis I follow your advice to check the device manager of Windows. Now the problem has gone. I don't know which part is the cause of the problem (maybe the error is eliminated because my computer restarts?) Nevertheless, my program runs well. Thank you for the help. @aha_1980 @jsulm @kuzulis
  • QMYSQL , QPSQL , QPSQL7 ! Driver not found

    Solved
    19
    0 Votes
    19 Posts
    3k Views
    T
    Hi Again , I solved the problem :: i had to remake the driver and after googling and looking in the forum many guys had the same problem with the actual driver and remaking new one. Here is how to do : I'm using Postgresql 10. 1. you need to download the zip file of postgresql where source code exist. 2. lunch the Qt Mingw console. 3. copy all the file exists in the include path of the download zip in %Path_TO_QT\src\qtbase\plugins\sqldrivers\psql ( if you don't you'll have problems with include files .h in mingw32-make 4. make sur to copy the lib files to the same folder psql ( libpq.dll , libeay32.dll, libintl , libiconv, ssleay32.dll ) ssleay32 you can have i from the net ( i got it from my xampp folder) 5. edit the file psql.pro and comment : QMAKE_USE += psql with a # if you don't you'll have error : psql model not defined 6. run the qmake command as follow: qmake "INCLUDEPATH+=PATH_TO_DOWNLOAD_SOURCE\pgsql\include" "LIBS+=PATH_TO_DOWNLOADED_SOURCE\pgsql\lib" psql.pro here PATH_TO_DOWNLOAD_SOURCE mean the path to the download zip extracted 7. run mingw32-make 8. run mingw32-make install Congrats. @Christian-Ehrlicher @JonB @mchinand thanks for your time and help :)
  • Problem with model, or Instantiator

    Solved
    4
    0 Votes
    4 Posts
    331 Views
    fcarneyF
    Okay, stupid mistake: void insert(int ind, int data){ if(ind < 0 || ind > rowCount()) return; QAbstractListModel::beginInsertRows(QModelIndex(), ind, ind); m_list.insert(ind, data); QAbstractListModel::endInsertRows(); emit countChanged(); } void remove(int ind){ if(ind < 0 || ind >= rowCount()) return; QAbstractListModel::beginRemoveRows(QModelIndex(), ind, ind); m_list.remove(ind); QAbstractListModel::endRemoveRows(); emit countChanged(); }
  • Windows dimension

    Unsolved
    2
    0 Votes
    2 Posts
    184 Views
    artwawA
    Hi, for starters, obviously, HD resolution on 23" screen will have larger pixels than on 12". On top of that there is scaling present in Windows, which allows one to scale the content - so you get bigger size of text, icons, etc. I'd suggest to start reading here: https://doc.qt.io/qt-5/highdpi.html In short, having fixed size anything in the UI, when one doesn't know both the target resolution (width, height, dpi) nor the scaling is not best practice. Having locked proportions of the UI elements, so they scale properly - that's something else.
  • QMdiSubwindows. I need to open many subwindows inside a grid and move them around.

    Unsolved
    2
    0 Votes
    2 Posts
    185 Views
    JonBJ
    @Jc_Opc I can only answer #2: the choice of using MDI windows has no effect on threads/processes. It is just a way of showing multiple windows, it has nothing to say about and no effect on what you show there.
  • QTableView get the correct index

    Solved
    2
    0 Votes
    2 Posts
    225 Views
    JonBJ
    @Mikeeeeee When dealing with indexes and QSortFilterProxyModel you must deal with mapping between the proxy and the underlying model. https://doc.qt.io/qt-5/qsortfilterproxymodel.html#mapFromSource & https://doc.qt.io/qt-5/qsortfilterproxymodel.html#mapToSource. etc. Is this connected to your issue?
  • This topic is deleted!

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

    Unsolved
    8
    0 Votes
    8 Posts
    41 Views
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • Qt prevent to insert duplicate data SQLITE Problem!

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    S
    i find the solution . the problem was in selecting table from database and i replace AND by OR and then it checks them one by one . thank you .
  • 0 Votes
    8 Posts
    2k Views
    SGaistS
    Congratulation and thank you for the fix :-)
  • Writing to the standard input of a process

    23
    0 Votes
    23 Posts
    16k Views
    SGaistS
    hi, Did you apply the same technique as @A1exander_Z did ?
  • Problems to load projects with new version

    Solved
    6
    0 Votes
    6 Posts
    683 Views
    Gabriela20G
    Hello @aha_1980 I have cleaned my build directory and that has resulted in the problem, thank you! Regards :)
  • 0 Votes
    8 Posts
    565 Views
    M.H.HM
    @SGaist Thanks for your help.
  • how to send file stream to activex server

    Solved
    2
    0 Votes
    2 Posts
    198 Views
    Y
    I tried sending file using QByteArray type and it worked.
  • No examples found on how to derive from QAbstractTextDocumentLayout

    2
    0 Votes
    2 Posts
    830 Views
    TrilecT
    Hi Sorry no one responded. Ive been looking also into this also you could try (or those searching this topic) KoTextDocumentLayout.h KoTextDocumentLayout.cpp https://github.com/JeremiasE/KFormula/blob/gsoc/libs/kotext/KoTextDocumentLayout.cpp
  • Read .odt file and loop over characters

    Unsolved odt html file qtextdocument
    6
    0 Votes
    6 Posts
    1k Views
    T
    @artwaw Yes, it works fine eventually :)