Skip to content
QtWS25 Last Chance
  • QQuick3DGeometry in Qt5/Qt6

    Unsolved General and Desktop
    1
    0 Votes
    1 Posts
    342 Views
    No one has replied
  • 0 Votes
    4 Posts
    1k Views
    VRoninV

    @ralphtink said in How to flatten a TreeView to show only the leaf node items?:

    I don't want to import a whole library just for this

    I would strongly suggest you do but even if you want to go against my advice you can just:

    take kbihash_p.h, kdescendantsproxymodel.h and kdescendantsproxymodel.cpp add the files to your project replace #include "kitemmodels_export.h" with #define KITEMMODELS_EXPORT satisfy LGPL 2 requirement on the imported code
  • 0 Votes
    1 Posts
    286 Views
    No one has replied
  • 0 Votes
    2 Posts
    259 Views
    JonBJ

    @Selvajothi
    I know nothing about this, but since you have received no other reply.....

    Since I do not see any "insert item" in QGraphicsPathItem Class, but I do see void QGraphicsPathItem::setPath(const QPainterPath &path)

    Sets the item's path to be the given path.

    See also path().

    are you supposed to use QPainterPath QGraphicsPathItem::path() const to retrieve the current path (if you need that), manipulate to insert your extra element, and pass it back to QGraphicsPathItem::setPath() to reset the path as a whole?

  • 0 Votes
    9 Posts
    1k Views
    jeremy_kJ

    @ben80 said in Use two QT5.x versions in parallel:

    @jeremy_k said in Use two QT5.x versions in parallel:

    What's the reason for using different versions of Qt 5? Going down this route opens up a class of problems involving incompatible intermingling.

    @jeremy_k said in Use two QT5.x versions in parallel:

    Option 4)
    Have you looked into using a virtualenv for the python program? Apt-get won't install into it, but pip will. This encapsulates the library path mangling, although the same environment pollution problem exists for child processes.

    It seems like there is so much that i can do wrong here. I am running this raspberry only at my home, so i am not distributing it. As long as i have a working solution (not too messy) it's ok for me.

    That's the best version of an unfortunate scenario. If you're careful about not executing other programs, the environment variable issue is manageable. Python modules that use external commands to discover bits of system configuration appears to be common. For example, https://github.com/pyinstaller/pyinstaller/issues/4657. QDesktopServices::openUrl() failing to work is another one to watch for.

    I cannot use pip on the raspberry, since there are no ARM packages for PySide2 provided. Therefore i am using apt-get. I am also using a pyenv virtualenv, but i need to copy the site-package files manually. Not nice, but it works.

    It might be reasonable to tell apt-get to install into the venv directory as an alternative root. For dpkg, the option appears to be --root=<alternative root>.

  • 0 Votes
    8 Posts
    711 Views
    A

    @Selvajothi
    You could create one QGraphicsWidget per design, then arrange them into one scene using QGraphicsLinearLayout.

  • 0 Votes
    2 Posts
    332 Views
    mrjjM

    Hi
    Well you ask the OS to open any app that is tied to the extension pdf.
    Its not really possible to ask it to close without using platform native api calls
    to find this window and try to close it.

    You could use
    https://doc.qt.io/qt-5/qtpdf-index.html
    to display the pdf yourself and hence be able to close the pdf view.

  • 0 Votes
    4 Posts
    1k Views
    JonBJ

    @Selvajothi
    There could be many causes. I suggest you Google for _dlopen specified procedure. Note that the error you show is on procedure, not on module.

  • 0 Votes
    7 Posts
    1k Views
    Chris KawaC

    @Selvajothi as I said - you need an instance of serverAuthentication passed to connect

    QObject::connect(networkaccess, SIGNAL(finished(QNetworkReply*)), __here__, SLOT(getcredential(QNetworkReply*))); ^ //you need a pointer to instance of serverAuthentication

    Where do you get it from? That's up to you. Also you're still leaking memory and have all the other issues I listed previously.

    Usually when working with C style libraries you have it organized kinda like this:

    void init(); // Creates instances of any "global" things you need, e.g. serverAuthentication and QNetworkAccessManager something doSomething(); // Does something with the global instances, like your AuthenticateServer function void shutdown(); // Destroys the global instances
  • 0 Votes
    3 Posts
    287 Views
    S

    thank you

  • 0 Votes
    4 Posts
    349 Views
    S

    solved the problem by adding self.end_index = len(self.existing_txt) in pathFromIndex after getting the text value from QLineEdit

  • 0 Votes
    4 Posts
    1k Views
    Pl45m4P

    @suslucoder

    There is no scrollBar by default but you can increase the space for your QLegend

    https://doc.qt.io/qt-5/qtcharts-legend-example.html#detaching-and-attaching-legends

    Or you put a custom legend in a QScrollArea

  • 0 Votes
    19 Posts
    2k Views
    nageshN

    @Christian-Ehrlicher thanks for the correction.

    @suslucoder it's showing old search items with different color because you have set it's background color in last search..
    It's better to set all with default color and matched items in highlight colour for each search