Skip to content

Brainstorm

Stuck? Some ideas just need to be dumped on someone before they can materialize.
458 Topics 3.2k Posts
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    32 Views
    No one has replied
  • 0 Votes
    2 Posts
    799 Views
    SGaistS
    Hi and welcome to devnet, Can you be more precise about the limitations you have in mind ? Qt provides the Accessibility module, did you already check what is available through it ?
  • *truly* simple example of painting?

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    J
    import sys from PyQt5.QtWidgets import QApplication, QWidget from PyQt5.QtGui import QPainter, QColor, QBrush from PyQt5.QtCore import Qt class GreenRectangleWidget(QWidget): def init(self): super().init() self.initUI() def initUI(self): self.setGeometry(100, 100, 400, 300) # Set the window's position and size self.setWindowTitle('Green Rectangle') self.show() def paintEvent(self, event): painter = QPainter(self) painter.setBrush(QBrush(QColor(0, 255, 0), Qt.SolidPattern)) # Set brush color to green painter.drawRect(50, 50, 300, 200) # Draw a rectangle (x, y, width, height) if name == 'main': app = QApplication(sys.argv) ex = GreenRectangleWidget() sys.exit(app.exec_())
  • has anyone ever bent a (QML) RangeSlider?

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    MesrineM
    If you want a RangeSlider that is more than half a circle you need to create a custom control using a mouse area... . if the control is horizontal one needs to know the y value where the user clicked. This is needed to map the visualPosition to a x,y properties of the handle. I do not know a way to get the mouse.y where the user clicked from inside RangeSlider type, I suggest creating a custom control. need to account for https://doc.qt.io/qt-6.2/qml-qtquick-controls2-control.html#event-handling If the RangeSlider is just half of a Circle then I think you can map the visualPosition to an x,y value and you can just customize the background and the handles of the RangeSlider. The price is increasing :).
  • how to display items from model in varying sizes?

    Solved
    4
    0 Votes
    4 Posts
    994 Views
    J
    @jeremy_k said in how to display items from model in varying sizes?: @mzimmers said in how to display items from model in varying sizes?: I would try using a GridLayout, but I don't know how I would "feed" model data to a Layout. Repeater Thanks
  • Rewriting Qt in Rust

    Unsolved
    67
    0 Votes
    67 Posts
    56k Views
    sierdzioS
    It would be nice if Qt developers used their years of GUI experience to make something cool in Rust. There is Slint - a GUI framework written in Rust, created by Qt experts: https://slint.dev
  • OpacityMask

    Unsolved
    1
    0 Votes
    1 Posts
    359 Views
    No one has replied
  • 'Mark all as read' in the bottom line in section 'unread'

    Solved
    4
    0 Votes
    4 Posts
    901 Views
    V
    Yes, I saw that also today. Looks like the admins changed that behavior in the last hours. Thank you!
  • Unit testing

    Unsolved
    1
    0 Votes
    1 Posts
    316 Views
    No one has replied
  • avoiding the use of hard-coded strings

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    S
    @mzimmers said in avoiding the use of hard-coded strings: I'm trying to determine how best to put all of my labels (using the term generically) into a single location that can be easily modified by a non-programmer. The goal would be to have no hard-coded strings in my code; they'd all reside in some file that could be altered by a technical writer or someone else. Even if your original labels are written down in English you can still have an English translation. (We do use English translations just for plurals. There is a command to just extract entries containing %n.) Translatable strings can also have an additional comment/description. This can help to clarify (and disambiguate) what you actually meant. Maybe use something to make it clear that a string needs still translation, e.g. instead of using the string My label use something like >>>MY LABEL<<< instead. This makes it easy to spot string not yet translated to English. Or use the variable name as the string to be translated (camelCase or snake_case would be easy to spot as well). Your English "translation" would be the single file for your technical writer.
  • Voluntarily removed How to track debug process?

    Unsolved
    2
    0 Votes
    2 Posts
    622 Views
    Axel SpoerlA
    @AnneRanch said in How to track debug process?: should this top level window be a main application object or be as another child mdiArea subwindow? With the context provided, it is not possible to answer this question, or even brainstorm about it. It's unclear, how this question relates to the headline of your post.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • passing lists of data to a Component

    Solved
    13
    0 Votes
    13 Posts
    4k Views
    mzimmersM
    @GrecKo yeah, this is a weird use case. I actually do want a list, just not a list in the Qt model/view/delegate sense. Ideally, I'd like to create a list (array/vector/whatever) of the properties I want to display, and pass it into a universal component for display, but creating and using that structure seems to be a bit out of reach for JS/QML/me. It's OK; this approach is working, if a bit inelegant.
  • Some Qt apps does not respect cursor icon preferences set in gnome-tweaks.

    Unsolved
    2
    0 Votes
    2 Posts
    652 Views
    mzimmersM
    @UlyssesZhan it's hard to say for sure, but I'd speculate that the Qt apps you mention set their own cursor properties rather than use the default settings in in gnome (or gnome-tweaks). Do you have the source code for these Qt apps?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    3
    0 Votes
    3 Posts
    2 Views
  • I’d like to suggest an improvement to the Fonts dialog

    Unsolved
    4
    0 Votes
    4 Posts
    845 Views
    TomZT
    @Sarreq-Teryx as an aside. KDE is still on Qt5 and are slowly moving over to Qt6 today. The various features your mockup requires are only available in the latest Qt6, so you're probably asking a bit early. Like asking about pretty wallpaper while the foundation is just drying.
  • division of labor between QML and C++

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    mzimmersM
    Just to close this topic out, here's what I ended up doing (posted elsewhere as well): // will need one of these for each subclass void EquipmentModel::sendPatchRequest(const Vsp &equipment) { sendBaseRequest(equipment); } void EquipmentModel::sendBaseRequest(const Equipment &equipment) { ... // the line below will call the override function // for the appropriate subclass. equipment.addPatchFields(listEntry, qjo, rolesToKeys); Not super elegant, but it works. Thanks to all for the suggestions.
  • to subclass or not to subclass...

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    mzimmersM
    Just to close this out, I'm pursuing the subclass approach to this. Thanks for the suggestions.
  • QEventLoop + QNetworkRequest = dead lock

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    A
    So I simply needed handle one more signal: QObject::connect(reply, &QNetworkReply::errorOccurred, &loop, &QEventLoop::quit);