Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 456.7k Posts
  • 3D scatter graph zoom issue

    Unsolved visualisation visualization datavisualizati
    1
    0 Votes
    1 Posts
    466 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Drawing objects in scatter plot

    Unsolved visualisation visualization datavisualizati
    1
    0 Votes
    1 Posts
    329 Views
    No one has replied
  • QFileDialog & favorites/customisation

    Unsolved qfiledialog
    2
    0 Votes
    2 Posts
    595 Views
    B
    Hi, there is https://doc.qt.io/qt-5/qfiledialog.html#setSidebarUrls, is that what you want?
  • Issues with qtDir::exist

    Unsolved
    16
    0 Votes
    16 Posts
    2k Views
    JonBJ
    @Christian-Ehrlicher said in Issues with qtDir::exist: is by default set to the build dir Ohhhh! I had not noticed that! Partly because when I started out on Qt I was using Python/PyQt5/PyCharm, which obviously does not have a "build directory" nor a .pro file. When I changed over to C++ + Creator I just never looked for this.....
  • QTCP threading ... again

    Solved
    7
    0 Votes
    7 Posts
    382 Views
    Q
    @Christian-Ehrlicher said in QTCP threading ... again: There is no conflict because now both operations are done in the same thread. Oh sure, of course... Thank you very much for your help!
  • Signal/slots in different threads and const reference?

    Solved
    2
    0 Votes
    2 Posts
    379 Views
    J.HilkJ
    @mistralegna Qt::QueuedConnections do implicit copying, so even when its marked const ref, the byte array will be copied and therefore live long enough
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    14 Views
    No one has replied
  • Unable to add networksettings module in pro file

    Unsolved
    4
    0 Votes
    4 Posts
    804 Views
    jsulmJ
    @soni yes
  • QLibrary : unknown type name?

    Unsolved
    3
    0 Votes
    3 Posts
    905 Views
    Ketan__Patel__0011K
    @RogerBreton Just Add #include <QLibrary> in your header either Source file of your project.
  • Sending QJsonArray over socket

    Unsolved
    11
    0 Votes
    11 Posts
    778 Views
    JKSHJ
    @Kris-Revi said in Sending QJsonArray over socket: like this? No. Please show us your payload. What does it look like before you passed it into deserializeJson()? (This is what @Christian-Ehrlicher meant by "raw data") Also: What is the value of length in webSocketEvent()? Converting an image into a QJsonArray is very expensive and inefficient. What is the purpose using QJsonArray here?
  • Can "item" be added on top of the "list" ?

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    Chris KawaC
    add - means just that - AT THE END Add means add. Doesn't really specify where. You can add to list, map, set, dictionary or sorted collection and it will have different placement in each. If you add to sorted collection it won't add at the end but at the place its sorting order indicates. For unsorted collections it just adds at the end because it happens to be the easiest and most performant operation. English word "add" doesn't have placement connotations, just expanding some collection to include given element. append - is more precise , again at the end Yes, but append is not used here for exactly that reason - it suggests position, which you can't guarantee if sorting is enabled. What should append b do to a sorted collection like this a,d,g? a,b,d,g? It breaks the meaning of append. a,d,g,b? It breaks sorting order. Both are wrong answers so if something can be sorted append operation is not included. On unsorted collections like QList or QString append is included because its meaning is clear and doesn't break container's assumptions. insert - means at selected place Agreed and it does just that. It could be more clear as insertAt, but the parameter clearly suggests that anyway. for example suggested "is sorting enabled " is NOT a feature of TextEdit. I mentioned it in context of QListWidget, which is a collection (list) of entries so it's obvious that it would sort those entries. It's not clear what would it sort in a QTextEdit - letters, words, sentences, paragraphs, text blocks, lines, something else? What if text has markup? What if there's block formatting? Should it break that, split blocks or reinterpret before sorting? Not clear at all. Different people different needs, so again - it doesn't try to guess for everyone. append - does not automatically advance line / index Why would it? Advancing a line would mean adding data to the collection that you didn't put there yourself. What if you wanted to append contents of a streaming text buffer (eg. from a real time chat) and it kept inserting line breaks whenever new data chunk arrived? It would totally destroy the data and be kinda excruciating to workaround (inserting artificial backspaces?). If you want a line break just append a line break. It's up to you as a user to implement behavior you need.
  • Button without form or simple

    Unsolved
    3
    0 Votes
    3 Posts
    225 Views
    O
    @Chris-Kawa thank you
  • Can't install the qmysql plugin in a Qt setup created using online installer

    Solved
    9
    0 Votes
    9 Posts
    885 Views
    SGaistS
    Hi, One more thing, ensure that you are using the qmake executable matching your Qt version for which you want to build the driver for.
  • QStandardItemModel or subclass QAbtractTableModel

    Unsolved
    2
    0 Votes
    2 Posts
    292 Views
    mrjjM
    Hi Well, it depends. QStandardItemModel works pretty well load and displays the data but editing is a bit clunky as when data changes, you get an Item * and must take its text and stuff it back into the right m_xxxx variable. If you make your own model, you would directly return/set the data to your CListBitmap . look here. http://www.java2s.com/Code/Cpp/Qt/Asimpleexamplethatshowshowselectionscanbeuseddirectlyonamodel.htm they uses QList<QStringList> rowList; but you would just use vector<CListBitmap> and most of the code would be the same, except the data function should also return the right m_xxx memeber it does like this now return rowList[index.row()][index.column()]; but you should map index.column() to a m_xxx variable A switch case could do it. A custom model is more code but also more flexible in the long run. It explains the functions here. https://doc.qt.io/qt-5/model-view-programming.html#an-editable-model
  • Draggable frame widget

    Unsolved c++ qt6 frame
    2
    0 Votes
    2 Posts
    477 Views
    mrjjM
    Hi Well you override the mouse functions and make it happen. virtual void mousePressEvent( QMouseEvent *e ); virtual void mouseMoveEvent( QMouseEvent *e ); virtual void mouseReleaseEvent( QMouseEvent *e ); have a look here https://gist.github.com/mnafees/10003130
  • MultiDigiMon -touch doesnt work with QProcess::startDetached("MultiDigiMon -touch");

    Unsolved
    7
    0 Votes
    7 Posts
    693 Views
    J
    @mrjj Hello, yes I can execute and no dialog are showed. I think the problem is that I am running a QT 32 bit app on a WIN10 x64 OS. Based on this post : link text But I found this post really interesting: link text I will try.
  • Programmatically determine if processor is 64-bit using Qt code

    7
    0 Votes
    7 Posts
    3k Views
    JoeCFDJ
    Sprezzatura is right. Check this out. https://doc.qt.io/archives/qt-5.9/qsysinfo.html#buildAbi https://doc.qt.io/qt-5/qsysinfo.html#buildAbi
  • 1 Votes
    7 Posts
    1k Views
    Christian EhrlicherC
    I don't think so. Simply take a look in the paintEvent() function of QTableView. Don't move columns what you want to use spans.
  • Is there a way to retrieve ui file from header file which is compiled by uic?

    Solved
    5
    0 Votes
    5 Posts
    357 Views
    A
    @JonB Thanks jon. will do that re-engineering. I opened this question to make sure that there is no tool like that which does this re-engineering things. So will close the question now. Thanks