Qt - Reddit – Telegram
Qt - Reddit
14 subscribers
242 photos
30 videos
4.05K links
News and discussion for the Qt Framework.

Subreddit: https://www.reddit.com/r/QtFramework

Powered by : @r_channels & @reddit2telegram
Download Telegram
I built a small Python IDE focused on faster Qt UI iteration (live .ui preview)

I spend a lot of time building Python desktop apps with Qt, and one thing that kept slowing me down was the UI feedback loop.

The usual cycle was:

edit a `.ui` file in Qt Designer
recompile it
run the app
realize the layout still wasn’t quite right
repeat

When working with AI tools (ChatGPT, Claude, etc.) that cycle got even worse, because you often want to visually verify small UI changes quickly.

So I built PyStudio, a small open-source Python IDE focused specifically on Qt UI development.

The main idea is simple:

edit Python and .ui files side by side
load Qt Designer `.ui` files into a live, sandboxed preview
press a key and instantly see layout / visual changes without running the app

It’s very much inspired by the old VBA / Delphi style workflow where the UI is something you work with continuously, not a build artifact you wait on.

It’s early but functional, and this is the tool I now use for my own Qt projects.

GitHub repo (screenshot in README):
https://github.com/william17050/pystudio

I’m sharing it in case it scratches the same itch for others.
Feedback is welcome, especially from people who build UI-heavy Qt apps.

https://redd.it/1pte2ha
@qt_reddit
When is the next Qt LTS release expected?

Hi everyone,

I'm planning a long-term project and I'm trying to understand when the next Qt LTS release is expected to be available.

Qt 6.8 LTS was released in October 2024, and I know that historically Qt has followed a consistent pattern for LTS releases (Qt 5 had 5.6, 5.9, 5.12, and 5.15 LTS).

Does anyone know when the next LTS is planned? Has Qt Company published any official roadmap or timeline for upcoming LTS releases?

I need to decide whether to start my project with 6.8 LTS now or wait for the next LTS version.

https://redd.it/1ptov7u
@qt_reddit
[Help][Qt v6.4.2] Why does SIGNAL/SLOT macro work QObject::connect for my QWebEngineView subclass but function pointers do not?

Hello all,

Per the noscript, I am using C++ Qt v6.4.2. I successfully used the new Qt6 style of connecting signals/slots such as


DNDWebEngineView *webView = new DNDWebEngineView();
QObject::connect(webView->page(), &QWebEnginePage::scrollPositionChanged, [this](const QPointF &position) { handleScrollPositionChanged(position); });

Where the header for DNDWebEngineView is as follows

#ifndef DNDWEBENGINEVIEW_H
#define DNDWEBENGINEVIEW_H

#include <QDragEnterEvent>
#include <QDropEvent>
#include <QWebEngineView>

class DNDWebEngineView : public QWebEngineView
{
Q_OBJECT
public:
explicit DNDWebEngineView(QWidget *parent = nullptr);
~DNDWebEngineView(){};

protected:
void dragEnterEvent(QDragEnterEvent *event) override;
void dropEvent(QDropEvent *event) override;

signals:
void updateStatusText(const QString &newFileOrUrl);
};

#endif // DNDWEBENGINEVIEW_H

I also have a CommandBarWidget whose header is as follows:

#ifndef COMMANDBARWIDGET_H
#define COMMANDBARWIDGET_H

#include <QLabel>
#include <QWidget>

class CommandBarWidget : public QWidget
{
Q_OBJECT
public:
explicit CommandBarWidget(QWidget *parent = nullptr);
~CommandBarWidget(){};

// ...

public slots:
void setStatusText(const QString &newFileOrUrl);
};

#endif // COMMANDBARWIDGET_H

I have a parent class (call it ParentWidget) that has the following code in its constructor:

DNDWebEngineView *webView = new DNDWebEngineView();
CommandBarWidget *cmdBar = new CommandBarWidget();

Which brings about my question, how do I hook this up such that a signal from webView will call a slot in cmdBar? As I understand it, the ParentWidget should contain the following code to make this happen:

QObject::connect(webView, &DNDWebEngineView::updateStatusText, cmdBar, &CommandBarWidget::setStatusText);

But that does not work. I get this super awesome lengthy and confusing [compiler error](https://imgur.com/a/CTXUsVX). I tried combinations of lambdas, local functions, putting the slot in the ParentWidget, etc. with no luck. What *does* work is this:

QObject::connect(webView, SIGNAL(updateStatusText(const QString &)), cmdBar, SLOT(setStatusText(const QString &)));

I don't understand why the old SIGNAL/SLOT macro syntax works for this case but the new function pointer syntax works everywhere else. It seems like this is an issue with subclassing QWebEngineView, even though that does have QObject as its root ancestor and the QOBJECT macro is included in my subclass.

While it is working with the macro syntax, I know this is not the correct solution and it's driving me mad! Any help would be greatly appreciated!


Thanks,

Blue

https://redd.it/1pu0ab0
@qt_reddit
Anyone Pyqt5 developer here ?

I am new at pyqt5 and looking for some guidance

I was developing a pyqt5 application

and i need to resize the window after widget changes

python My main.py file

from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QApplication, QDialog,QMainWindow
from PyQt5.uic import loadUi
import sys
from tasks import Tasks



class MainWindow(QMainWindow):
   
    def init(self):
        super(MainWindow,self).init()
        loadUi("main.ui",self)


   
        self.tasks.clicked.connect(self.taskfunc)
       
   
    def task
func(self):
        widget.setCurrentIndex(widget.currentIndex() +  1)





## adjusting size of next widget
## call widget by name rather by index




if name == "main":
    app = QApplication(sys.argv)
    widget = QtWidgets.QStackedWidget()


    widget.addWidget(MainWindow())
    widget.addWidget(Tasks())
   
    widget.show()
    sys.exit(app.exec())

and my [
tasks.py](http://tasks.py/) file

from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QApplication, QDialog,QMainWindow
from PyQt5.uic import loadUi
import sys

class Tasks(QMainWindow):

def \
_init__(self):
super(Tasks,self).__init__()
loadUi("tasks.ui",self)
self.resize(1200,1200)

Like i want my home page to be of geometry (200,200)

and my tasks page to be of (1200,1200 ) is this possible ??Anyone Pyqt5 developer here ?

https://redd.it/1pun3n2
@qt_reddit
Building an Interactive Maze Generator and Pathfinder with Qt 6, H3 Hexagonal Grids, and Bidirectional A

# Building an Interactive Maze Generator and Pathfinder with Qt 6, H3 Hexagonal Grids, and Bidirectional A


A deep dive into implementing Randomized Prim's Algorithm and advanced pathfinding on Uber's H3 geospatial grid system using modern C++ and QML

https://preview.redd.it/cjkdju1f2l9g1.png?width=3024&format=png&auto=webp&s=0f73480d9f9c6cfadb94b8cae74183436459f781

https://reddit.com/link/1pw9rdx/video/pkmsat8g2l9g1/player




# Introduction

The intersection of geospatial computing and algorithmic visualization presents fascinating opportunities for developers working with location-based applications. Whether you're building navigation systems, game worlds, or urban planning tools, the ability to efficiently partition geographic space and find optimal paths through it remains a fundamental challenge.

qHexWalker is an open-source Qt 6 application that demonstrates how to leverage Uber's H3 hexagonal indexing system alongside MapLibre Native Qt to create interactive maze generation and pathfinding visualizations. The project showcases several advanced techniques including Randomized Prim's Algorithm for maze generation, Bidirectional A* search for efficient pathfinding, multi-waypoint routing, and real-time visualization on actual geographic maps.

This article explores the architectural decisions, algorithmic implementations, and technical challenges involved in building such a system. We'll examine why hexagonal grids offer advantages over traditional square grids, how H3's hierarchical structure enables scalable geospatial analysis, and the implementation details that make real-time visualization possible.

# Why Hexagonal Grids? The Mathematics of Spatial Efficiency

Before diving into implementation details, it's worth understanding why hexagonal grids have become the preferred choice for many geospatial and gaming applications. Unlike square grids, where diagonal neighbors are farther away than orthogonal ones (√2 vs 1 unit), hexagonal cells maintain uniform distances between all adjacent cells.

This property has profound implications for pathfinding algorithms. In a square grid with eight-directional movement, you must handle two distinct movement costs. In a hexagonal grid, every neighbor is equidistant from the center cell. This uniformity simplifies distance calculations, eliminates the need for diagonal movement cost adjustments, and produces more natural-looking paths.

Research in grid-based pathfinding has demonstrated that hexagonal grids provide a better topological representation of underlying space. Each hexagon uniquely shares one side with each adjacent hexagon, and the branching factor for optimal pathfinding can be reduced to three when considering movement direction. This reduction in branching factor translates directly to fewer nodes evaluated during search, improving computational efficiency.

The tradeoff is implementation complexity: hexagonal coordinate systems require more careful handling than simple (x, y) pairs. However, libraries like H3 abstract away much of this complexity while adding hierarchical capabilities that enable multi-resolution analysis.

# H3: Uber's Hierarchical Hexagonal Geospatial Indexing System

At the core of qHexWalker's geospatial capabilities is H3, an open-source library developed by Uber for partitioning the globe into hexagonal cells. H3 differs from simple hexagonal tiling by providing a discrete global grid system with 16 resolution levels, ranging from cells averaging 4,357,449 km² (resolution 0) down to approximately 0.9 m² (resolution 15).

H3 achieves near-uniform cell sizes across the globe by using gnomonic projections centered on the faces of an icosahedron. This approach minimizes the size distortion that plagues Mercator-based systems, where cells near the poles appear dramatically larger than those near the equator. The hierarchical nature of H3 means each cell can be subdivided into approximately seven child cells, enabling
efficient zoom operations and multi-scale analysis.

From a C++ perspective, H3 provides straightforward APIs for coordinate conversion and cell operations:

#include <h3/h3api.h>

// Convert latitude/longitude to H3 index at resolution 9
H3Index cellIndex;
LatLng location = {.lat = degsToRads(40.689), .lng = degsToRads(-74.044)};
latLngToCell(&location, 9, &cellIndex);

// Get neighboring cells
H3Index neighbors7;
int neighborCount;
gridDisk(cellIndex, 1, neighbors);

// Get cell boundary for rendering
CellBoundary boundary;
cellToBoundary(cellIndex, &boundary);


qHexWalker integrates H3 through vcpkg, making dependency management straightforward across platforms. The project's vcpkg.json manifest ensures consistent library versions, and CMake's find_package mechanism handles the linking automatically.

# Maze Generation with Randomized Prim's Algorithm

The classic Prim's algorithm finds minimum spanning trees in weighted graphs by greedily selecting the smallest-weight edge connecting the tree to an unvisited vertex. For maze generation, we randomize this selection: instead of choosing the minimum-weight edge, we select a random edge from the frontier set.

This randomization transforms a deterministic optimization algorithm into a stochastic maze generator with distinctive characteristics. Mazes produced by Randomized Prim's Algorithm tend to have many short dead-ends and a "spiky" appearance, creating visually interesting labyrinths that differ from the long corridors produced by depth-first search approaches.

The algorithm proceeds as follows. First, initialize a grid where all cells are walls. Select a random starting cell and mark it as part of the maze. Add all walls adjacent to this cell to a frontier list. Then, while the frontier is not empty, randomly select a wall from the frontier. If exactly one of the cells separated by this wall is part of the maze, remove the wall (creating a passage) and add the newly reached cell to the maze. Add all walls adjacent to the new cell to the frontier. Remove the selected wall from the frontier regardless of whether it was converted to a passage.

Adapting this algorithm to H3's hexagonal structure requires careful consideration of neighbor relationships. Unlike square grids where neighbors are determined by simple coordinate arithmetic, H3 cells use the gridDisk function to retrieve neighboring indices:

void HexMazeGenerator::generateMaze(H3Index startCell, int resolution) {
std::unorderedset<H3Index> inMaze;
std::vector<H3Index> frontier;

inMaze.insert(startCell);
addFrontierCells(startCell, frontier, inMaze);

std::random
device rd;
std::mt19937 gen(rd());

while (!frontier.empty()) {
std::uniformintdistribution<> dis(0, frontier.size() - 1);
sizet idx = dis(gen);
H3Index current = frontier[idx];

// Find neighbors already in maze
H3Index neighbors[7];
gridDisk(current, 1, neighbors);

std::vector<H3Index> inMazeNeighbors;
for (int i = 0; i < 7; ++i) {
if (neighbors[i] != 0 && inMaze.count(neighbors[i])) {
inMazeNeighbors.push
back(neighborsi);
}
}

if (!inMazeNeighbors.empty()) {
// Connect to random in-maze neighbor
std::uniformintdistribution<> neighborDis(0, inMazeNeighbors.size() - 1);
H3Index connection = inMazeNeighborsneighborDis(gen);

createPassage(current, connection);
inMaze.insert(current);
addFrontierCells(current, frontier, inMaze);
}

frontier.erase(frontier.begin() + idx);
}
}


The visual result is a maze where passages wind through the hexagonal grid, with walls naturally following cell boundaries. When overlaid on a
Building an Interactive Maze Generator and Pathfinder with Qt 6, H3 Hexagonal Grids, and Bidirectional A*

# Building an Interactive Maze Generator and Pathfinder with Qt 6, H3 Hexagonal Grids, and Bidirectional A*

*A deep dive into implementing Randomized Prim's Algorithm and advanced pathfinding on Uber's H3 geospatial grid system using modern C++ and QML*

https://preview.redd.it/cjkdju1f2l9g1.png?width=3024&format=png&auto=webp&s=0f73480d9f9c6cfadb94b8cae74183436459f781

https://reddit.com/link/1pw9rdx/video/pkmsat8g2l9g1/player




# Introduction

The intersection of geospatial computing and algorithmic visualization presents fascinating opportunities for developers working with location-based applications. Whether you're building navigation systems, game worlds, or urban planning tools, the ability to efficiently partition geographic space and find optimal paths through it remains a fundamental challenge.

**qHexWalker** is an open-source Qt 6 application that demonstrates how to leverage Uber's H3 hexagonal indexing system alongside MapLibre Native Qt to create interactive maze generation and pathfinding visualizations. The project showcases several advanced techniques including Randomized Prim's Algorithm for maze generation, Bidirectional A\* search for efficient pathfinding, multi-waypoint routing, and real-time visualization on actual geographic maps.

This article explores the architectural decisions, algorithmic implementations, and technical challenges involved in building such a system. We'll examine why hexagonal grids offer advantages over traditional square grids, how H3's hierarchical structure enables scalable geospatial analysis, and the implementation details that make real-time visualization possible.

# Why Hexagonal Grids? The Mathematics of Spatial Efficiency

Before diving into implementation details, it's worth understanding why hexagonal grids have become the preferred choice for many geospatial and gaming applications. Unlike square grids, where diagonal neighbors are farther away than orthogonal ones (√2 vs 1 unit), hexagonal cells maintain uniform distances between all adjacent cells.

This property has profound implications for pathfinding algorithms. In a square grid with eight-directional movement, you must handle two distinct movement costs. In a hexagonal grid, every neighbor is equidistant from the center cell. This uniformity simplifies distance calculations, eliminates the need for diagonal movement cost adjustments, and produces more natural-looking paths.

Research in grid-based pathfinding has demonstrated that hexagonal grids provide a better topological representation of underlying space. Each hexagon uniquely shares one side with each adjacent hexagon, and the branching factor for optimal pathfinding can be reduced to three when considering movement direction. This reduction in branching factor translates directly to fewer nodes evaluated during search, improving computational efficiency.

The tradeoff is implementation complexity: hexagonal coordinate systems require more careful handling than simple (x, y) pairs. However, libraries like H3 abstract away much of this complexity while adding hierarchical capabilities that enable multi-resolution analysis.

# H3: Uber's Hierarchical Hexagonal Geospatial Indexing System

At the core of qHexWalker's geospatial capabilities is H3, an open-source library developed by Uber for partitioning the globe into hexagonal cells. H3 differs from simple hexagonal tiling by providing a discrete global grid system with 16 resolution levels, ranging from cells averaging 4,357,449 km² (resolution 0) down to approximately 0.9 m² (resolution 15).

H3 achieves near-uniform cell sizes across the globe by using gnomonic projections centered on the faces of an icosahedron. This approach minimizes the size distortion that plagues Mercator-based systems, where cells near the poles appear dramatically larger than those near the equator. The hierarchical nature of H3 means each cell can be subdivided into approximately seven child cells, enabling
efficient zoom operations and multi-scale analysis.

From a C++ perspective, H3 provides straightforward APIs for coordinate conversion and cell operations:

#include <h3/h3api.h>

// Convert latitude/longitude to H3 index at resolution 9
H3Index cellIndex;
LatLng location = {.lat = degsToRads(40.689), .lng = degsToRads(-74.044)};
latLngToCell(&location, 9, &cellIndex);

// Get neighboring cells
H3Index neighbors[7];
int neighborCount;
gridDisk(cellIndex, 1, neighbors);

// Get cell boundary for rendering
CellBoundary boundary;
cellToBoundary(cellIndex, &boundary);


qHexWalker integrates H3 through vcpkg, making dependency management straightforward across platforms. The project's `vcpkg.json` manifest ensures consistent library versions, and CMake's `find_package` mechanism handles the linking automatically.

# Maze Generation with Randomized Prim's Algorithm

The classic Prim's algorithm finds minimum spanning trees in weighted graphs by greedily selecting the smallest-weight edge connecting the tree to an unvisited vertex. For maze generation, we randomize this selection: instead of choosing the minimum-weight edge, we select a random edge from the frontier set.

This randomization transforms a deterministic optimization algorithm into a stochastic maze generator with distinctive characteristics. Mazes produced by Randomized Prim's Algorithm tend to have many short dead-ends and a "spiky" appearance, creating visually interesting labyrinths that differ from the long corridors produced by depth-first search approaches.

The algorithm proceeds as follows. First, initialize a grid where all cells are walls. Select a random starting cell and mark it as part of the maze. Add all walls adjacent to this cell to a frontier list. Then, while the frontier is not empty, randomly select a wall from the frontier. If exactly one of the cells separated by this wall is part of the maze, remove the wall (creating a passage) and add the newly reached cell to the maze. Add all walls adjacent to the new cell to the frontier. Remove the selected wall from the frontier regardless of whether it was converted to a passage.

Adapting this algorithm to H3's hexagonal structure requires careful consideration of neighbor relationships. Unlike square grids where neighbors are determined by simple coordinate arithmetic, H3 cells use the `gridDisk` function to retrieve neighboring indices:

void HexMazeGenerator::generateMaze(H3Index startCell, int resolution) {
std::unordered_set<H3Index> inMaze;
std::vector<H3Index> frontier;

inMaze.insert(startCell);
addFrontierCells(startCell, frontier, inMaze);

std::random_device rd;
std::mt19937 gen(rd());

while (!frontier.empty()) {
std::uniform_int_distribution<> dis(0, frontier.size() - 1);
size_t idx = dis(gen);
H3Index current = frontier[idx];

// Find neighbors already in maze
H3Index neighbors[7];
gridDisk(current, 1, neighbors);

std::vector<H3Index> inMazeNeighbors;
for (int i = 0; i < 7; ++i) {
if (neighbors[i] != 0 && inMaze.count(neighbors[i])) {
inMazeNeighbors.push_back(neighbors[i]);
}
}

if (!inMazeNeighbors.empty()) {
// Connect to random in-maze neighbor
std::uniform_int_distribution<> neighborDis(0, inMazeNeighbors.size() - 1);
H3Index connection = inMazeNeighbors[neighborDis(gen)];

createPassage(current, connection);
inMaze.insert(current);
addFrontierCells(current, frontier, inMaze);
}

frontier.erase(frontier.begin() + idx);
}
}


The visual result is a maze where passages wind through the hexagonal grid, with walls naturally following cell boundaries. When overlaid on a
real geographic map via MapLibre, the effect is striking: a navigable labyrinth superimposed on actual terrain.

# Bidirectional A* for Efficient Pathfinding

While standard A\* search efficiently finds optimal paths by expanding nodes in order of f(n) = g(n) + h(n), Bidirectional A\* can dramatically reduce search space by simultaneously searching from both start and goal. The two search frontiers meet somewhere in the middle, ideally requiring each to explore only half the nodes that unidirectional search would examine.

The key challenge in Bidirectional A\* is determining termination and path extraction. The algorithm cannot simply stop when the two frontiers first meet, as this meeting point might not lie on the optimal path. Instead, we must continue until we can prove no better path exists.

For hexagonal grids, the heuristic function uses the H3 grid distance, which counts the minimum number of cells between two points:

int64_t hexDistance(H3Index a, H3Index b) {
int64_t distance;
gridDistance(a, b, &distance);
return distance;
}

double heuristic(H3Index current, H3Index goal) {
return static_cast<double>(hexDistance(current, goal));
}


The bidirectional search maintains two open sets and two closed sets:

struct SearchState {
std::priority_queue<Node, std::vector<Node>, NodeComparator> openSet;
std::unordered_map<H3Index, double> gScore;
std::unordered_map<H3Index, H3Index> cameFrom;
};

std::vector<H3Index> bidirectionalAStar(H3Index start, H3Index goal,
const MazeGraph& maze) {
SearchState forward, backward;

forward.openSet.push({start, 0, heuristic(start, goal)});
forward.gScore[start] = 0;

backward.openSet.push({goal, 0, heuristic(goal, start)});
backward.gScore[goal] = 0;

double bestPathLength = std::numeric_limits<double>::infinity();
H3Index meetingPoint = 0;

while (!forward.openSet.empty() && !backward.openSet.empty()) {
// Expand from the direction with smaller minimum f-value
if (forward.openSet.top().f <= backward.openSet.top().f) {
expandNode(forward, backward, goal, maze, bestPathLength, meetingPoint);
} else {
expandNode(backward, forward, start, maze, bestPathLength, meetingPoint);
}

// Termination check
if (forward.openSet.top().f + backward.openSet.top().f >= bestPathLength) {
break;
}
}

return reconstructPath(forward, backward, meetingPoint);
}


This bidirectional approach is particularly effective for maze navigation where the optimal path might wind through many cells. By searching from both ends, we exploit the symmetry of the problem and often find the meeting point quickly.

# Multi-Waypoint Routing: Extending Beyond Point-to-Point

Real-world navigation rarely involves simple point-to-point journeys. qHexWalker extends its pathfinding capabilities to handle multiple waypoints, finding efficient routes that visit all specified locations. This transforms the problem into a variant of the Traveling Salesman Problem (TSP), which we solve using a combination of precomputed pairwise distances and heuristic optimization.

The implementation first computes optimal paths between all pairs of waypoints using our Bidirectional A\* implementation. These distances form a complete graph where waypoint ordering can be optimized. For small numbers of waypoints (typical in interactive applications), a greedy nearest-neighbor approach with 2-opt improvement produces good results quickly:

std::vector<int> optimizeWaypointOrder(const std::vector<std::vector<double>>& distances) {
int n = distances.size();
std::vector<int> tour = nearestNeighborTour(distances);

bool improved = true;
while (improved) {
improved = false;
for
(int i = 0; i < n - 1; ++i) {
for (int j = i + 2; j < n; ++j) {
double delta = distances[tour[i]][tour[j]] +
distances[tour[i+1]][tour[(j+1) % n]] -
distances[tour[i]][tour[i+1]] -
distances[tour[j]][tour[(j+1) % n]];
if (delta < -1e-9) {
std::reverse(tour.begin() + i + 1, tour.begin() + j + 1);
improved = true;
}
}
}
}

return tour;
}


The final route is assembled by concatenating the precomputed paths between consecutive waypoints in the optimized order, providing a complete navigation solution through the hexagonal maze.

# Real-Time Visualization with Qt 6 and MapLibre

Bringing algorithmic computation to life requires effective visualization. qHexWalker leverages Qt 6's QML capabilities alongside MapLibre Native Qt to render hexagonal cells and paths on interactive vector maps.

MapLibre provides the mapping foundation, rendering OpenStreetMap-style tiles with smooth pan, zoom, and rotation. The Qt integration through `QMapLibre::Location` allows seamless embedding of the map view in QML interfaces:

import QtQuick
import QtLocation
import QtPositioning
import MapLibre 3.0

MapView {
id: mapView
anchors.fill: parent

map.plugin: Plugin {
name: "maplibre"
PluginParameter {
name: "maplibre.map.styles"
value: "https://demotiles.maplibre.org/style.json"
}
}

map.center: QtPositioning.coordinate(55.751244, 37.618423)
map.zoomLevel: 14
}


Hexagonal cells from H3 are rendered as GeoJSON polygons. The cell boundary retrieval and conversion to Qt coordinate types happens in C++, exposed to QML through Qt's property system:

QVariantList HexGridModel::getCellBoundary(qint64 cellIndex) const {
CellBoundary boundary;
H3Index h3Index = static_cast<H3Index>(cellIndex);
cellToBoundary(h3Index, &boundary);

QVariantList coordinates;
for (int i = 0; i < boundary.numVerts; ++i) {
QVariantMap point;
point["latitude"] = radsToDegs(boundary.verts[i].lat);
point["longitude"] = radsToDegs(boundary.verts[i].lng);
coordinates.append(point);
}

return coordinates;
}


Animation of pathfinding progress uses Qt's timer mechanism to progressively reveal explored cells, creating engaging visualizations that help users understand algorithmic behavior. The search frontier expansion, meeting point discovery, and final path extraction all become visible stages in the visualization.

# Conclusion

qHexWalker demonstrates the power of combining modern geospatial libraries with classical algorithms. The synergy between H3's hierarchical hexagonal indexing, Randomized Prim's maze generation, and Bidirectional A\* pathfinding creates an application that is both technically sophisticated and visually compelling.

The choice of Qt 6 with QML provides a clean separation between algorithmic C++ code and declarative user interface definitions. MapLibre's open-source mapping capabilities ensure the application works without proprietary dependencies, while vcpkg simplifies cross-platform dependency management.

For developers interested in geospatial computing, game development, or algorithmic visualization, the techniques presented here offer a foundation for building sophisticated location-aware applications. The hexagonal grid paradigm, while requiring more initial investment than square grids, pays dividends in path quality and computational efficiency.

# Call to Action

Ready to explore hexagonal pathfinding yourself? The complete qHexWalker source code is available on GitHub at [https://github.com/wecand0/qHexWalker](https://github.com/wecand0/qHexWalker). The project welcomes
contributions, whether you're interested in adding new maze generation algorithms, optimizing pathfinding performance, or extending the visualization capabilities.

To get started, clone the repository and follow the build instructions in the README. You'll need Qt 6.5+, vcpkg for dependency management, and MapLibre Native Qt installed on your system. The project supports Linux, macOS, and Windows, making it accessible to developers across platforms.

Have questions or ideas? Open an issue on GitHub or submit a pull request. Together, we can push the boundaries of what's possible with hexagonal geospatial computing.

https://redd.it/1pw9rdx
@qt_reddit
new to this and im having an issue (first time) Arch linux-KDE Plasma (if that matters)

So im trying to open an app that used the "xcb" program plug in but when i check the system logs it says that it can find xcb but not initialize? these are all the qt packages (from pacman) that i have installed. i can look at the logs if you need more info at any time.

qt6-base

qt6

xcb-util-cursor

polkit-qt6

qt6-noscript

qt6-declarative

xcb-util

https://redd.it/1pwil9k
@qt_reddit
Delayed response to mouse pad clicks

I'm noticing a delayed response to clicks in my QML application when using the track pad, whether its on a button, text field, list item, etc. However, the problem does not apply when using the mouse button, or in other applications using the track pad, so I don't think it's related to my OS settings.

Has anyone else encountered similar?

I'm running Windows 11.

https://redd.it/1pwn135
@qt_reddit
Discover What Qt Learning Achieved in 2025 and How to Learn Qt in 2026
https://redd.it/1pylj0d
@qt_reddit
G-Pilot G-Code Sender - looking for help

Main window

Main window - light mode

Hi. I’m working on a G-Pilot G-Code Sender application (early stage project). It is a GRBL controller app with a G-code visualizer. It’s written in Qt 6.8.

The app can:

load, edit, save and send g-code to your machine,
visualise the toolpath,
control a GRBL-based machine via console and UI buttons,
show machine state,
support joystick / controller input,
run in virtual mode without real hardware.

Right now it’s very early stage and I’m looking for anyone who wants to help with development, ideas, testing or contributions.

https://github.com/etet100/G-Pilot-GCode-Sender

https://redd.it/1pzqq6k
@qt_reddit
onCurrentItemChanged is not called when proxy model is sorted

onCurrentItemChanged isn't being called on my ListView when the proxy model is sorted. As such, it is becoming very difficult for me to track the currently selected item. Is there an acceptable workaround?

https://redd.it/1pzz5tl
@qt_reddit