Skip to content
  • 0 Votes
    10 Posts
    2k Views
    V
    @JonB said in Trouble Running Python Script in Qt - Using QRC Resources: @Veltroniv I built an .exe file from my .py file with all the dependencies (included libraries etc...). I presume you mean that whatever tool you used to generate a .exe from the .py source embeds a standalone Python interpreter into that executable, so no external Python is needed? yes, i guess. Its working properly so... And, just checking, what did you use to "gathering the path to exe file"? I assume you mean to the top-level executable of your Qt application, and then you locate the other executable generated from the Python script because you know it's relative to where your top-level executable will be installed? Yess, thats correct. It might not have been clear.
  • TableView's RowHeightProvider issue

    Unsolved QML and Qt Quick qt6 qml types tableview pyside6
    1
    0 Votes
    1 Posts
    369 Views
    No one has replied
  • 0 Votes
    5 Posts
    897 Views
    A
    @jsulm Thanks , yes I missed this. now It's working ! Thank you
  • QtJambi 6.5.2 available

    Language Bindings java qt6 qt6.5 language ui design
    1
    1 Votes
    1 Posts
    428 Views
    No one has replied
  • 0 Votes
    1 Posts
    240 Views
    No one has replied
  • Qt6 Android QVideoFrame map crash after resume

    Unsolved QML and Qt Quick qt6 android qtquick qml c++
    3
    2 Votes
    3 Posts
    755 Views
    A
    UPDATE: This is a known bug in Qt https://bugreports.qt.io/browse/QTBUG-113616
  • MouseArea enabled property

    Unsolved QML and Qt Quick mouse qt6
    1
    0 Votes
    1 Posts
    240 Views
    No one has replied
  • QObjects are being deleted by a Loader

    Unsolved QML and Qt Quick qt6 loader memorymanagemen
    4
    0 Votes
    4 Posts
    554 Views
    Axel SpoerlA
    @malocascio Good morning, thanks for sharing the solution! You found it yourself, I wasn't of much help here...
  • QtJambi 6.5.1 available

    Language Bindings java qt6 qt6.5 ui design language
    1
    0 Votes
    1 Posts
    477 Views
    No one has replied
  • 0 Votes
    5 Posts
    870 Views
    bibasmallB
    @Christian-Ehrlicher Thank you, it helped! In fact, these two commits contained what I needed: Fix dragging a docked QDockWidget [REG-fix] 430985: Refix QDockwidget drag out dockwidget
  • How to access Sqlite3 aggregate recordset

    Solved Qt 6 qt6 select sum sqlite3
    7
    0 Votes
    7 Posts
    794 Views
    D
    @SGaist Hi. No I didn't. That fixed the problem I was having. Thanks so much for your help.
  • 0 Votes
    2 Posts
    432 Views
    G
    @Guy-Radford This appears to be a bug as the CAN Frames are decoded correctly on a windows machine, I have raised a Bug report with QT: https://bugreports.qt.io/browse/QTBUG-113538
  • 0 Votes
    2 Posts
    630 Views
    franco.amatoF
    Where did you use the redirectUri? It does not appear in your code
  • 0 Votes
    1 Posts
    667 Views
    No one has replied
  • pyside6 pass custom ListModel to ListView

    Solved QML and Qt Quick qml python3 qt6 pyside6 qt quick
    3
    0 Votes
    3 Posts
    2k Views
    L
    @jeremy_k Thank You for the explanation! As you said I had to implement the roleNames() Function and adjusted the data(). The code below now works import sys import typing import PySide6 from PySide6 import QtCore from PySide6 import QtGui from PySide6.QtCore import QByteArray class ProductListModel (QtCore.QAbstractListModel): def __init__(self, products, parent = None): super().__init__(parent) self.products = products def data(self, index, role): """Returns an appropriate value for the requested data. If the view requests an invalid index, an invalid variant is returned. Any valid index that corresponds to a string in the list causes that string to be returned.""" row = index.row() if not index.isValid() or row >= len(self.products): return None product = self.products[row] if role == QtCore.Qt.DisplayRole: return product.name elif role == QtCore.Qt.EditRole: return product.name elif role == QtCore.Qt.UserRole + 1: return product.id elif role == QtCore.Qt.UserRole + 2: return product.name return None def headerData(self, section, orientation, role=QtCore.Qt.DisplayRole): """Returns the appropriate header string depending on the orientation of the header and the section. If anything other than the display role is requested, we return an invalid variant.""" if role != QtCore.Qt.DisplayRole: return None if orientation == QtCore.Qt.Horizontal: return f"Column {section}" return f"Row {section}" def rowCount(self, parent: typing.Union[PySide6.QtCore.QModelIndex, PySide6.QtCore.QPersistentModelIndex] = ...) -> int: # return length of productList return len(self.products) def roleNames(self): roles = { QtCore.Qt.UserRole + 1: b'id', QtCore.Qt.UserRole + 2: b'name', } return roles class Product: def __init__(self, id:int, name:str): self.id = id self.name = name```
  • 0 Votes
    6 Posts
    980 Views
    S
    @ChrisW67 It did not. I ended up reinstalling Linux and that seems to have fixed it. I still have the old install available so I'd like to find out the root cause still.
  • 0 Votes
    8 Posts
    2k Views
    R
    @Recursion I really think I identified the actual issue now so I need help essentially getting my Xamarin service added/linked to the Qt project. I am unsure how to do this. I followed the tutorial here and I have tried both starting up the function in the service and binding to it and neither work. QT6 Android Services I am pretty convinced that the problem is that in the example they created a class QtAndroidService that extends QtService. In my case I just extended Service as QtService isn't available in Xamarin/C#. The example says this should work. Here is the thing though. In the example it executes the function for example bycalling the method startQtAndroidService located at "org/qtproject/example/qtandroidservice/QtAndroidService". I looked at my current Qt project and its directory starts off the exact same "org.qtproject.example.myappname". I guess I must have just built the UI off an example and never changed it. So I think this means that somehow they put the library file QtAndroidService within the Qt project. I'm assuming its a .so file because when I currently run it I'll get back an error saying "Didn't find class "SOB.Bacon.com.backend.RunBackend.ForegroundBackendService" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib, /system/vendor/lib]]". The class is still named ForegroundBackendService but its not a foreground service anymore I followed the example exactly just kept the same name I'll change it. If I look in the /system/lib folder on the Android device it is filled with files with lib in the name ending in .so. If I look in my SOB.Bacon project install directory on the Android device there is a lib folder. I do not see a library with the same name as my service though, the .so files that are in there seem to have nothing to do with anything other than what Xamarin needs. So first off I do not know how to get Xamarin to generate a .so file. It will make a .dll file but that is for use by other Xamarin applications. So I have two routes/questions: 1. Based on that example how do I link/point Qt to look for the service in a different location on the Android tablet, right now it seems to only be looking in /system/lib or /system/vendor/lib. 2. If a .so file is required, how was the other xamarin application able to execute the service, and how was ADB able to execute the service? In which case how do I make Qt execute a service that is NOT part of its own package? Thanks a lot!
  • Hosting MSFT WebView2 browser control in a QT QWidget

    Unsolved General and Desktop qwidget qt6 native
    1
    0 Votes
    1 Posts
    557 Views
    No one has replied
  • QMetaType alias in Qt6

    Unsolved General and Desktop metatype qt5 qt6
    8
    0 Votes
    8 Posts
    1k Views
    T
    @crueegg Hi, unfortunately, we had to cope with the same issue. The only way to circumvent it was to create a singleton class that handles a mapping between the id of the QMetaType and the custom alias. See https://gitlab.inria.fr/dtk/dtk-core/-/issues/30 for more details. Thib.