Skip to content

Brainstorm

Stuck? Some ideas just need to be dumped on someone before they can materialize.
440 Topics 3.2k Posts
  • 4 Votes
    23 Posts
    7k Views

    @Giridhar Two comments- QT examples are as received
    from some comments on forum " very basic ".
    That is OK , but lack of function description , lack of description of passed parameters to the function,
    and overall lack of "comments" eliminates "examples" as a learning resource.
    ( as a poorest example - error processing in non existent in examples -
    I have been told "it is not basic " to process errors )

    Same goes for using forum as a learning resource.

    The forum unadvertised purpose is to resolve coding issues.
    There are some very knowledgeable contributors doing so, but they are a minority.
    So far I have not found many technical forums as a beneficial learning resource - most
    "how do I ..." receive reply "Google it ".

    As far as "doing a survey " - that is your choice to "get up the speed " in your job ,
    I would suggest to skim the forum, it may also help.

    Good luck
    Cheers

  • EXE of QT Demo projects.

    Solved 7 days ago
    0 Votes
    4 Posts
    119 Views

    @Pl45m4.

    Err... ignore.

    I thought it was something that was easy for QT to supply.

  • 0 Votes
    11 Posts
    378 Views

    @Cantona said in Help sending data from dialog to main window:

    variable username still is not getting any data assigned to it

    Unpleasant answer but no secret or surprise:
    You need to know C++ if you want to get somewhere with Qt :)
    Learn the basics of C++ and OOP and you will understand better and learn faster how to work with Qt.

    @JonB said in Help sending data from dialog to main window:

    // mainwindow cpp file QString username; UsernameDialog *usernameDialog = new UsernameDialog; if (usernameDialog->exec()) username = usernameDialog->username();

    This answer by @JonB is basically everything you need to do to return your variable from your dialog and assign it to something within your QMainWindow class.

  • -1 Votes
    2 Posts
    637 Views

    I had similar challenges when I was working on a mobile payment app. For developing a dynamic app with merchant features, card attachments, and payment scheduling, it’s crucial to have a secure and reliable payment gateway integration.

    To solve this issue, I recommend you to read about mobile app payment gateway integration . This article provides a clear understanding of how to integrate payment gateways into your app, which will be helpful for implementing the features you're aiming for.

  • 0 Votes
    5 Posts
    370 Views

    It is always good to have version control right from the start (Git even works locally and can push the full history later). You should start right away to use GitHub. At first, make the repository private for you to work on and once it is stable, make it public.

  • 4 Votes
    16 Posts
    4k Views

    Any updates to this tutorial? Trying on an M4 Mac and the crosstool-ng build is crapping out when trying to build make.

  • This topic is deleted!

    Unsolved 25 Oct 2024, 05:45
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • This topic is deleted!

    Unsolved 24 Sept 2024, 11:04
    0 Votes
    1 Posts
    32 Views
    No one has replied
  • 0 Votes
    2 Posts
    281 Views

    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 ?

  • 0 Votes
    4 Posts
    716 Views

    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_())

  • 0 Votes
    6 Posts
    739 Views

    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 :).

  • 0 Votes
    4 Posts
    377 Views

    @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 12 Feb 2023, 16:49
    0 Votes
    67 Posts
    36k Views

    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 29 Jun 2024, 08:36
    0 Votes
    1 Posts
    164 Views
    No one has replied
  • 0 Votes
    4 Posts
    379 Views

    Yes, I saw that also today. Looks like the admins changed that behavior in the last hours. Thank you!

  • Unit testing

    Unsolved 4 May 2024, 06:41
    0 Votes
    1 Posts
    173 Views
    No one has replied
  • 0 Votes
    9 Posts
    699 Views

    @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.

  • 0 Votes
    2 Posts
    358 Views

    @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 23 Apr 2024, 07:34
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • 0 Votes
    13 Posts
    1k Views

    @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.