Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • How can i use QPainter to draw triangles

    Solved
    4
    0 Votes
    4 Posts
    788 Views
    B
    @jsulm Thanks. I have fixed it. I deleted 'static' from the declaration of my QPointF array. So, rather than have: static const QPointF points [3] = { ... } , I have: const QPointF points [3] = { ...}. Thanks everyone.
  • Receive event when pc wake up

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    B
    @SGaist thanks for your answers. Finally, I found the solution. I didn't use the right handle for register solution.
  • how to link two items in QtDesigner ?

    Unsolved
    2
    0 Votes
    2 Posts
    131 Views
    mrjjM
    Hi Well, I think you set a fixed size on the spacer and that will not work when resizing the window. What you can do is to change the layout with the QTableViews to a Gridlayout. ( right-click it in the right side tree view and use the Layout menu to change it) Then move the buttons inside the grid layout with the Views. (delete the old layout where buttons were as we dont need it) Then on each button, right-click and change layout alignment to "TOP" [image: DLwTNq.png] and it will resize like this. I hope its what you want :) [image: drop4.gif]
  • Program crashes when global variable included.

    Unsolved
    22
    0 Votes
    22 Posts
    6k Views
    Christian EhrlicherC
    @jbbb said in Program crashes when global variable included.: any idea what this means? Take a look at the stacktrace to see where it comes from (as already said in my first post). I would guess the this pointer is a nullptr.
  • Dragging function in 3D visualisation

    Unsolved data visualizat visualisation visualization
    1
    0 Votes
    1 Posts
    377 Views
    No one has replied
  • QPixmap not read svg

    Solved
    14
    0 Votes
    14 Posts
    2k Views
    M
    I reinstall conda and after its work
  • 3D scatter graph zoom issue

    Unsolved visualisation visualization datavisualizati
    1
    0 Votes
    1 Posts
    495 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
    344 Views
    No one has replied
  • QFileDialog & favorites/customisation

    Unsolved qfiledialog
    2
    0 Votes
    2 Posts
    641 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
    3k 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
    402 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
    389 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
    825 Views
    jsulmJ
    @soni yes
  • QLibrary : unknown type name?

    Unsolved
    3
    0 Votes
    3 Posts
    914 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
    813 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
    229 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
    892 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.