Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. A Beginner’s Question
Forum Updated to NodeBB v4.3 + New Features

A Beginner’s Question

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 122 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anstoi
    wrote last edited by
    #1

    I’m a beginner in Qt and have been learning QML for a while. Recently, I’ve run into some confusion: when writing code in QML, I feel like I can only build relatively polished user interfaces. But when it comes to writing backend code to implement the functionality I want, and making the frontend serve the backend, I don’t know where to start. That’s why I came here—hoping to find an answer.

    joborJ 1 Reply Last reply
    0
    • A anstoi

      I’m a beginner in Qt and have been learning QML for a while. Recently, I’ve run into some confusion: when writing code in QML, I feel like I can only build relatively polished user interfaces. But when it comes to writing backend code to implement the functionality I want, and making the frontend serve the backend, I don’t know where to start. That’s why I came here—hoping to find an answer.

      joborJ Offline
      joborJ Offline
      jobor
      wrote last edited by
      #2

      For simpler applications, the backend can be written directly in JavaScript. I'd recommend writing it in C++, unless you're using Qt for Python, of course. Then, Python is your backend language.

      The C++ way can be figured out here: https://doc.qt.io/qt-6/qtqml-cppintegration-overview.html

      Qt comes with a lot of example projects and tutorials: https://doc.qt.io/qt-6/qtexamplesandtutorials.html
      Pick one that looks interesting / similar to what you want to achieve, and start exploring.

      A 1 Reply Last reply
      1
      • joborJ jobor

        For simpler applications, the backend can be written directly in JavaScript. I'd recommend writing it in C++, unless you're using Qt for Python, of course. Then, Python is your backend language.

        The C++ way can be figured out here: https://doc.qt.io/qt-6/qtqml-cppintegration-overview.html

        Qt comes with a lot of example projects and tutorials: https://doc.qt.io/qt-6/qtexamplesandtutorials.html
        Pick one that looks interesting / similar to what you want to achieve, and start exploring.

        A Offline
        A Offline
        anstoi
        wrote last edited by
        #3

        @jobor thanks for your answer,Yesterday I looked up some more information. For host-computer programs and similar applications, isn’t the common practice to write methods in C++ classes, register them to QML, and then call these classes during runtime? Qt comes with many sample projects, and from what I’ve seen, quite a few follow this approach. However, what I urgently need right now is a complete project with sufficient backend logic to study.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved