Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
84.1k Topics 460.4k Posts
Qt 6.11 is out! See what's new in the release blog
  • Reporting inappropriate content on the forums

    Pinned Locked spam
    29
    4 Votes
    29 Posts
    56k Views
    A
    Thank you for the report. I have banned the user, which got rid of the spam posting. Not a loss, as this user did not post any other content on the site. Just deleting this one posting was not possible. Thanks for reporting this.
  • Advice on Bezier curve class implementation

    Unsolved
    3
    0 Votes
    3 Posts
    75 Views
    L
    I don't currently have any implementation examples of derived classes because I wanted to try and establish the parent class beforehand. However, I will try to make as much sense as to what I want the derived classes to function/look like. Basically, the derived classes will override the computeBezier method, which will make use of this equation which calculates the x-y coordinates of the bezier curve based on control points P0, P1, P2, P3 (the curve is a cubic in this case, hence the highest degree of 3 in the equation) [image: 67db0cf3-b363-4a28-b45d-21ccc5d1a95c.png] The ctrlPts variable will be a list that stores points which represent the positions of each control point in graphics view space (i.e, pixel coordinates). Ideally, derived classes will have a copy of the DataPort struct (that they inherit from base class) in which they store bezier curve data (control point locations and bezier curve coordinates) via the public setter method, which will look something like: void setBezier() { DataPort_Bezier.bezierData = computeBezier(); } // this setter will set the Bezier curve data in the struct using the computeBezier method My main question was, how do I initialize these struct variables (which are QLists) as empty lists each time a derived class is instantiated? I apologize that I couldn't provide a coded example, and I understand if this hinders the ability to provide criticism on the code I have provided thus far. If I can figure out the first question, I will make a first-pass attempt at implementing a derived class so I can add it to this topic
  • How to make OS with Qt (Operating System)

    Solved
    17
    0 Votes
    17 Posts
    6k Views
    Nils SjobergN
    @Martin-codes-wiki Two things: A. Your name is too long B. You responded a little late
  • Context menu RTL bug

    Solved
    6
    0 Votes
    6 Posts
    167 Views
    A
    @IgKh yes this is the bug, updating my system fixed it.
  • Design pattern of inventory management desktop application

    Solved
    5
    0 Votes
    5 Posts
    287 Views
    Pl45m4P
    @sales99 Beside m_memberVar there is also _memberVar mMemberVar and more variants... which are a matter of taste. At least one of them should be picked to differ between class member and local scope variables
  • Modern App Packaging

    Unsolved
    10
    0 Votes
    10 Posts
    795 Views
    S
    mani mani, but apps dont deploy, waste of time
  • Beware of nested event loops

    Unsolved
    7
    3 Votes
    7 Posts
    625 Views
    S
    you cant call run() run() simply
  • Excel file - loop crashout - c++

    Unsolved
    3
    0 Votes
    3 Posts
    271 Views
    S
    sheet readStr gives you null as there is somewhere no valid data, print index where it crash
  • Is there an "aggregate" version of QValidator?

    Unsolved
    4
    0 Votes
    4 Posts
    2k Views
    S
    you can put a QMap of validators/input widgets and signal every input change to slot that checks the inputs for validity. you could sub-class all items to emit a same signal to indicate input change, that would allow to put them in some validity checker. or if the ::event stuff allows it better
  • How to trigger a virtual keyboard when click into a QSpinBox?

    Unsolved
    3
    0 Votes
    3 Posts
    223 Views
    S
    you could subclass QSpinBox to allow you to catch focus events and trigger vkbd
  • fake mouse move events when scrolled programatically

    Unsolved
    11
    0 Votes
    11 Posts
    443 Views
    S
    isnt there a widget signal blocker that stops signals while manipulating manually
  • Porting Widgets app from Qt5 to Qt6, widget style issue

    Unsolved
    6
    0 Votes
    6 Posts
    400 Views
    S
    could be a bug, i would say if QSpinBox not subclassed or otherwise stylesheets or messed up wont show up as expected
  • building qtpdf manually fails to find c/c++ std headers

    Unsolved
    3
    0 Votes
    3 Posts
    316 Views
    S
    isn‘t xcode command line tools supposed to be a compiler setup.
  • Trouble in android sdk setup in Qt Creator

    Unsolved
    4
    0 Votes
    4 Posts
    233 Views
    SGaistS
    Hi and welcome to devnet, This a user forum where other users answer. For immediate fixes, you should contact the Qt Company. That said, you do not provide enough information such as version of Qt you are using for Androïd. Please take a look at the corresponding requirements chapter and use the JDK, SDK and NDK specified there. The changes between NDK versions can be quite large and often break stuff for third party such as Qt.
  • Create Custom Window, with custom TitleBar

    Solved
    13
    0 Votes
    13 Posts
    5k Views
    U
    Hi, Please check out my custom designed frameless window: https://github.com/umar-masood/QtNovaFramelessWindow
  • Frameless windows window while still using window manager

    2
    0 Votes
    2 Posts
    2k Views
    U
    Hi, Please check out my custom designed frameless window: https://github.com/umar-masood/QtNovaFramelessWindow
  • Slot called twice when button pressed

    Unsolved
    24
    0 Votes
    24 Posts
    27k Views
    A
    @aha_1980 Excellent, ta. Solved my problem.
  • 0 Votes
    4 Posts
    2k Views
    J
    @Jammin44fm in case anyone is still using QtScript, I have an, AI assisted, experimental but functional port for Qt6. https://github.com/JulienMaille/qtscript-qt6 Feel free to test it and comment
  • 0 Votes
    11 Posts
    1k Views
    SGaistS
    Excellent ! Good luck :-)
  • How does the tdesktop render tabs?

    Unsolved
    4
    0 Votes
    4 Posts
    313 Views
    JKSHJ
    @MarkoProg said in How does the tdesktop render tabs?: They don't use QML; they render everything from scratch using QWidgets, and I'm also interested in this approach. How exactly did they achieve this using QWidgets? The idea the same, regardless of whether you're using Qt Quick or Qt Widgets: A Model stores an overview of the chat data. One row in the Model represents one chat. A row would contain data like chat title, chat icon, latest timestamp, latest message, delivery status. A Delegate lays out the GUI components in its rectangle (e.g. icon on the left, timestamp of the top-right). A ListView (Qt Quick) or QListView/QListWidget (Qt Widgets) is used to display the "tabs". If the Model contains N rows (N chats), then the View creates N Delegates. The View takes data from each row and gives that data to corresponding Delegate of that row. The Delegate then writes the data into the GUI