Questions tagged [qt]

Qt is a cross-platform application and UI framework for developers using C++ or QML, a CSS & JavaScript like-language. (Also use the [c++] tag for C++ code.)

Filter by
Sorted by
Tagged with
2 votes
0 answers
36 views

Barebones Qt/QML app that generates a list of dishes and then a shopping list with ingredients

I have written a simple app that generates a menu in the form of a list of recipes. It furthermore generates a shopping list, given a menu, consisting of the (unique) ingredients in the recipes that ...
Michele Bolognini's user avatar
0 votes
1 answer
67 views

Python GUI Based IP location digger

Greetings. I'm a newbie python developer who just started using PyQt5 as his major GUI development tool. Because of this, I have started a side project known as NyvoAI, just for gaining more knowledge ...
KhodeNima's user avatar
  • 349
2 votes
1 answer
65 views

Do a thing with a derived string for a number of strings

I feel this should be possible more concisely, less code repetition, with a loop and a two-dimensional array or something. But not sure how exactly. Any best practice for review? ...
Lecker Kebap's user avatar
2 votes
3 answers
167 views

How to efficiently build an object from list or array of strings

I am working with an API that delivers some data in a QStringList or basically a list of strings. The data contains keys and values but it is not a ...
DEKKER's user avatar
  • 121
5 votes
0 answers
1k views

Qt - Creating a dark overlay to apply on top of other widgets with animation

I want to be able to create a dark overlay on top of other widgets that can be turned on or off with animation. I managed to get this to work. But I think I'm doing it in a wrong and inefficient way; ...
sanab3343's user avatar
3 votes
1 answer
858 views

Real time histogram using multithreading (Qt + Qwt)

I'm writing a GUI for different VME modules (electronics). There are several of them which are used for the data acquisition. For example, an ADC produces the digitized maximum voltage on its input. ...
LRDPRDX's user avatar
  • 831
1 vote
1 answer
324 views

Handle C++ templates in Qt5

Searching for a solution to my problem I've read many posts regarding templates in Qt (including those on SE) and didn't find a complete solution (or I should say a complete example of a solution) so ...
LRDPRDX's user avatar
  • 831
1 vote
1 answer
109 views

Blocking until one or multiple signals is emitted

I've written this little helper function, that will block the current thread until any of a given list of signals is emitted by an object or until an optional timeout is reached. It can be used to ...
perivesta's user avatar
  • 125
8 votes
0 answers
988 views

A simple Qt + MQTT doorbell application

So I built a house recently and didn't want to rely on "privacy-questionnable" systems like Google Home or Amazon whatever so I decided to build a doorbell system myself. Hardware I use a ...
tai's user avatar
  • 181
1 vote
0 answers
300 views

Use OpenSSL and Qt to build the correct X509 certificate chain based on a pool and a leaf

This is my solution to a question I asked on stackoverflow. The scenario is as follows: I got my X509 certificate and a pool of other X509 certificates. Now I want to calculate the chain of trust, ...
Eric's user avatar
  • 235
1 vote
0 answers
485 views

Indicating a lost signal when streaming live video with GStreamer and Qt

The goal of the code is to display a live camera feed sent by GStreamer over UDP, and to give an indication of when the signal is lost by displaying a static blue screen instead of the last frozen ...
Patrick's user avatar
  • 73
1 vote
1 answer
123 views

Concurrent dependant routines in a gui application [closed]

The idea is that, in my application I have 5 routines named long_process_1, long_process_2, ...
Aykhan Hagverdili's user avatar
2 votes
1 answer
2k views

Implementing toggle button using Qt

I have below code for implement toggle button. After including below code, processing power consumed over 90% in my embedded application. Is there any way to reduce this processing power. ...
user3559721's user avatar
3 votes
1 answer
407 views

QTableView implementation

I've put together my first table using Qt's QTableView and a custom data model. Currently, some data is populated on initialisation, and the user has the option of adding and deleting entries. ...
19172281's user avatar
  • 131
0 votes
1 answer
131 views

QCombobox Case selection - Pyside2 Index via Sqlite

I have a very simple file where I have a Qcombobox Filter. When you select the filter, I run through a case on the index and output results. So, on selection I trigger: ...
Sam's user avatar
  • 103
3 votes
1 answer
755 views

Windows task manager clone

I have made a clone of windows task manger using QT and c++. When I started out this project I had much less knowledge of c++ then I do know so the style of some parts of the code are not always ...
nullptr's user avatar
  • 669
1 vote
1 answer
315 views

Minimal Property system in c++17

So I needed to represent by objects in terms in ini format and change their values from the ini as well, so I thought why don't implement a property system for this. I want it to be bit fast so I ...
bluedragon's user avatar
3 votes
0 answers
1k views

Pagination For Qt's Listview

I'm creating a generic pagination helper class. Personally I use this class for navigating through Records which are loaded into any sequential containers e.g ...
k03rdt6's user avatar
  • 31
7 votes
2 answers
326 views

Hunt the Wumpus Game (C++ with QT)

I reworked the Game I did in FLTK some while ago: Hunt the Wumpus GUI (FLTK) This time I used C++ with the Qt Framework. The result looks like this: If you want to try out the game. The full code ...
Sandro4912's user avatar
  • 3,066
6 votes
2 answers
478 views

Minefield - A Cross Platform Minesweeper clone

I just finished a full minesweeper clone which is based on Minesweeper for Windows 95. I used C++ and Qt to realize it. The full source code can be find in my git hub. Since this is too much code ...
Sandro4912's user avatar
  • 3,066
6 votes
1 answer
129 views

Mvc design for FTP Client

This app will be a FTP desktop application meant to transfer files between a server and a client, pretty much like Filezilla, there is no server code to show as I will not implement Network features ...
kandabi's user avatar
  • 63
3 votes
1 answer
92 views

Generating word sounding similar to the ones given in a wordlist

The goal is to make a word generator. The program takes a word list (typically, it may be the full dictionary of a language, or a list of names), analyses it, and then invents word that sound alike ...
sayanel's user avatar
  • 171
4 votes
1 answer
286 views

Calculate Cash Flow

I have written a cashflow calculator. Any suggestions on how to improve the code below? Income and expenses have a similar pattern. ...
rafael gonzalez's user avatar
6 votes
1 answer
310 views

Create HTML structure dynamically

We had a long HTML string with information about the makers of our software. However, for i18n this was unwieldy. So I started to refactor, so only each person's description is translateable, not all ...
Lecker Kebap's user avatar
1 vote
0 answers
89 views

Extensible tree header context menu

I have a Qt tree view which has a custom tree header. The tree has a so called mode, by default there are two. During each of the modes a different tree is shown. The mode switcher is presented as a ...
user3132457's user avatar
4 votes
2 answers
1k views

Parser for STL stereolithography data files [closed]

I'm parsing STL files to load the coordinates. My code is: ...
Megidd's user avatar
  • 145
3 votes
1 answer
180 views

Qt / C++/ Warehouse Club Management System

I am building a primitive Store Management System based on Qt and would appreciate some feedback. Classes: ManagementSystem - the logic unit of the system ...
userresu's user avatar
5 votes
0 answers
94 views

Interfaces and OOP Design for Image Editor software

I'm new to C++ programming, and I'm building an Image Editor software like Lightroom/CameraRaw from scratch. Apart from procedural code (actually seems that all the functions works correctly) my goal ...
Alessandro Cerro's user avatar
8 votes
2 answers
4k views

C++ Snake game using Qt-framework

I made a QT version of "Snake console game in C++" using Qt Creator 4.9.0 on Windows 7: I would like to know what can be improved, focused on the QT stuff since im new to it. I seperated the program ...
Sandro4912's user avatar
  • 3,066
4 votes
1 answer
460 views

Filter for CANbus frames

The actual data types here are probably not relevant to post an answer. I use Qt types here, but the question should apply for other structured types as well. I ...
darkmattercoder's user avatar
6 votes
1 answer
346 views

Qt Number Generator v2

Link to the old question. I tried to learn some new things from the answers and here's what I did: Used Qt Designer so that in Config.h, all member variables and ...
sliziky's user avatar
  • 135
5 votes
2 answers
630 views

GUI Number Generator in QT C++

I'm pretty new to Qt but already have a little experience with C++ so the first "project" I wanted to try out was a GUI random number generator. I am looking for some advices either in naming ...
sliziky's user avatar
  • 135
4 votes
1 answer
576 views

Enum class for weight units

I have some enum classes for units, like Weight units (KG and LB). I am translating the code to Qt C++ from Java, and I'm wondering what the best way to do this is as enums cannot have constructors in ...
Django's user avatar
  • 185
2 votes
0 answers
16 views

QVSquareLayout implementation for Qt that makes all internal items to be squared

qsquarelayout.h ...
outoftime's user avatar
  • 1,729
1 vote
0 answers
1k views

Transfering Image Data with QTCPSocket

In my program I am transferring image files continuously through QTCPSocket for each frame I am creating new connection which I believe causes the performance problems. But I couldn't transform my ...
onur cevik's user avatar
4 votes
1 answer
1k views

C++ Qt simple GUI game

I'm trying to learn how to use Qt (5.11.1) for GUI applications so I've done a simple memory game where 12 tiles are displayed and every time the user clicks on a tile it will show an image, so they ...
Floella's user avatar
  • 207
3 votes
0 answers
47 views

Basic Qt5 UI with button [closed]

I have the following Qt class: mainwindow.h class MainWindow : public QWidget { Q_OBJECT QPushButton* m_button; public: explicit MainWindow(); }; mainwindow....
Leogout's user avatar
  • 203
1 vote
1 answer
257 views

Prepare a cross-platform QT C-wrapper class for unit testing and mocking

The situation I recently started a cross platform QT project (arm, linux-x86, windows) that aims to interact with CAN-Bus hardware. I want to learn and get used to unit testing from scratch as good ...
darkmattercoder's user avatar
1 vote
0 answers
2k views

Drawing rectangle on a video with mouse in QT

I created a where I select a video using QOpenFileDialog and play the video on QGraphicsView. After that I select an area on ...
onur cevik's user avatar
1 vote
1 answer
167 views

Simple Qt GUI to list user-created categories and tasks

I've written a very simple program using Qt that I intend to continue working on as I continue learning C++ and Qt. I'm mostly wondering about my general code and comment style, specifically in terms ...
Cameron's user avatar
  • 121
-1 votes
1 answer
417 views

How to use a predicate to create or filter vector [closed]

I have function which returns a vector or strings (values from an sqlite3 table). For each of those strings I need to generate a Qt Checkbox, if it does not exist yet. My first version looks like ...
Jens Luedicke's user avatar
3 votes
0 answers
641 views

PyQt layout wrapper with indents

As I'm sure a lot of you are aware, the layout files generated for Qt look quite horrible. Maya had a wrapper that let you indent each widget when building manually, so I decided to have a try with ...
Peter's user avatar
  • 1,125
4 votes
1 answer
272 views

Age in hours calculator

I've written a small script, which calculates hours since the birth. I ask use about how old they are in years, months and day. I show them approximately how many hours they have lived. Below is the ...
Santosh Kumar's user avatar
1 vote
0 answers
236 views

Alt-Coin Wallet QT Project for Mac OS-X

I was told my QT Project file is a hot mess. I'm returning to C++ after many years of doing Java and I'm really new to QT. I would like someone familiar with QT Project files to give my code a once ...
David Whitehurst's user avatar
2 votes
1 answer
245 views

Concurrent access to data with QReadWriteLock

Using Qt, I've got this code in order to protect access to some shared data between threads. I'm pretty sure the idea is correct, but I don't know if RVO and/or RAII could potentially screw the ...
Raziel's user avatar
  • 108
2 votes
0 answers
1k views

PyQt frame which changes color with child focus

I am working on an application that has various "panels" contained within splitters. I wanted the panel border to change color when one of it's children gained focus. Here is a simple example of the ...
Spencer's user avatar
  • 261
8 votes
1 answer
700 views

Simple postfix calculator app

Premise I'm writing a simple postfix calculator app in C++ using the Qt (5) GUI framework. This is simply for practice with software development. Visually, my calculator looks like this: The ...
Aleksandr Hovhannisyan's user avatar
5 votes
1 answer
3k views

Plotting a GPS track

I have performed this test and they have not given me a conclusive answer (they really have not given me any response). I have to paint a graphic, do you think the implementation is correct? Is there ...
felixjimcal's user avatar
12 votes
3 answers
2k views

A moveable QScopedPointer, or a Qt and std cross-compatible unique_pointer

I'm a hobby programmer, so I've never been through a code review before (online or offline). That said, here goes: Background I use Qt extensively but have long wanted ...
jonspaceharper's user avatar
8 votes
2 answers
6k views

A simple Fraction class

My code seems to work fine. However, I feel like it is a bit too long (fraction.cpp). I really want to create simple, readable, and efficient code. Sample Run: Here is the fraction.h file: ...
Anna Phuong's user avatar