Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.2k Topics 455.4k Posts
  • Scroll a custom drawn widget

    Solved
    9
    0 Votes
    9 Posts
    630 Views
    SGaistS
    Great ! Then please mark the thread as solved so other forum users may know a solution has been found :-)
  • How to use QNetworkAccessManager in multiple threads

    Solved
    16
    0 Votes
    16 Posts
    4k Views
    SGaistS
    Hi, Just in case, currently it's 6 requests simultaneously.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    309 Views
    No one has replied
  • pybind11 / pyside2 / c++qt... oh dear

    Unsolved
    3
    0 Votes
    3 Posts
    573 Views
    D
    Hey Sweet will check out that blog, post example too if I'm still stuck afterwards :- )
  • How get image in QtWebApp

    Solved
    5
    0 Votes
    5 Posts
    343 Views
    M
    It turned out to be in startup.cpp you need to remember to change the name, then initialization passes and the server works normally. /** Name of this application */ #define APPNAME "HttpSerwerQtWebAppGameTamada"
  • Getting multiple lineseries y axies values based on x axies value.

    Unsolved
    3
    0 Votes
    3 Posts
    247 Views
    SGaistS
    Hi, I haven't used that module but from the looks of it, you can query the position on the chart with mapToPosition and pass it a series. To me it seems to go into the right direction.
  • This topic is deleted!

    Solved
    4
    0 Votes
    4 Posts
    17 Views
  • QGraphicsVideoItem mirror ?

    Solved
    4
    0 Votes
    4 Posts
    396 Views
    sonichyS
    @Bonnie It seems must use this format: setTransform(QTransform().translate(x, y).scale(-1, 1).translate(-x, -y),
  • How to hide the dialog window close button?

    12
    0 Votes
    12 Posts
    48k Views
    Pl45m4P
    @Buller This thread is 9 years old :) Check out the QT Window Flag example: https://doc.qt.io/qt-5/qtwidgets-widgets-windowflags-example.html
  • How to tagging QTreewidget items?

    Unsolved
    3
    0 Votes
    3 Posts
    529 Views
    B
    The selected items can be got from QList<QTreeWidgetItem *> QTreeWidget::selectedItems() const And the rect of a visible item can be get from QRect QTreeWidget::visualItemRect(const QTreeWidgetItem *item) const But the rect is relative to its parent, not global. You will need to map it if you want global coordinate. There is no "TAG" in QTreeWidgetItem, but like @SGaist said an item can have an image (as icon) and a string (as name) at the same time. If you still need to store other information, you can set user defined data to it. void QTreeWidgetItem::setData(int column, int role, const QVariant &value) You can define a number as role, but must equal or bigger than Qt::UserRole, and set any kind of data as value. The value can be retrieved by: QVariant QTreeWidgetItem::data(int column, int role) const If you set a QString as value, you can convert the retrieved QVariant by: QString QVariant::toString() const
  • Clear QSharedMemory after crash

    Solved
    4
    0 Votes
    4 Posts
    713 Views
    dporobicD
    @JonB This seems to be working, here my solution: https://github.com/ksnip/ksnip/blob/master/src/bootstrapper/singleInstance/InstanceLock.h https://github.com/ksnip/ksnip/blob/master/src/bootstrapper/singleInstance/InstanceLock.cpp
  • Reference to a function in libxml2.dll that isn't there

    Unsolved libxml2 xmlxptreval
    6
    0 Votes
    6 Posts
    751 Views
    mrjjM
    @dcoup so most likely he has something in his user path that loads something so when your app starts there is a version conflict. I would ask him to create a new user account on his box if possible and see if issue persists.
  • Because he draws in half QPixmap & QPainter

    Unsolved
    9
    0 Votes
    9 Posts
    587 Views
    D
    I solved it differently, implementing with library QImage, drawing pixel by pixel, quite long but reliable implementation code. thanks anyway. regards
  • How to display path with QRegion member of Ellipse type correctly?

    Unsolved
    2
    0 Votes
    2 Posts
    383 Views
    J
    I understood what is wrong with path, intersected region consists of many rectangles, and they are circled with black pen. So to remove black stripes i added pntr.setPen(Qt::NoPen); and no more black lines. So variant with drawPath() works. Now, how to use setClipRegion() or setClipPath() with update()? It doesn't display anything.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Find special QTtreeWidgetItem if QTreeWidget has many items with this name

    Solved
    3
    0 Votes
    3 Posts
    241 Views
    Please_Help_me_DP
    @Christian-Ehrlicher it is sad... But thank you!
  • Common Folders

    Solved
    6
    0 Votes
    6 Posts
    503 Views
    jsulmJ
    @TomBombadill said in Common Folders: But where I stored Datas is not the business of Qt Maybe you should first read the link? Nobody is forcing you to do anything. Using https://doc.qt.io/qt-5/qstandardpaths.html you can get paths usually used for specific tasks (like where home directory is, temp location, pictures, videos, application setting) specific for the platform your app is running on. If you want to store something in unusual locations you can still do this, but in most cases a developer should respect the system design guide lines (in fact on mobile platforms you have to)...
  • Codesign with Qt 5.14.2 under MacOS 10.15

    Unsolved
    14
    0 Votes
    14 Posts
    4k Views
    sierdzioS
    @SGaist said in Codesign with Qt 5.14.2 under MacOS 10.15: @sierdzio said in Codesign with Qt 5.14.2 under MacOS 10.15: << "-o" << "runtime" Looks like this one is now done for 5.15 Thanks for info :-)
  • How send data between two instances of same application

    Solved
    7
    0 Votes
    7 Posts
    810 Views
    dporobicD
    I've ended up using QLocalSocket and QLocalServer which seem to be working and lightweight. One drawback is that only ByteArrays are sent between the Caller and Sender, I'm working around that by converting my object to ByteArrays messages on one side and back to objects on the other. In case someone is looking for a solution: https://github.com/ksnip/ksnip/blob/master/src/backend/ipc/IpcServer.h https://github.com/ksnip/ksnip/blob/master/src/backend/ipc/IpcServer.cpp https://github.com/ksnip/ksnip/blob/master/src/backend/ipc/IpcClient.h https://github.com/ksnip/ksnip/blob/master/src/backend/ipc/IpcClient.cpp
  • Drawing 70k objects in QGraphicsView - lag lag lag

    Unsolved qgraphicsview
    12
    0 Votes
    12 Posts
    1k Views
    mrjjM
    @Dariusz Ok so you could get the 40K sample to lag also ?