This is my code below:
MainWindow::MainWindow(CoreDictionary const& dict)
{
ui.setupUi(this);
ui.searchField->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
}
MainWindow::MainWindow(CoreDictionary const& dict)
: QMainWindow(nullptr), dict{dict}
{
ui.setupUi(this);
ui.searchField->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
}
To copy to clipboard, switch view to plain text mode
the Qt::AlignRight is there not because I need it, but to prove the function is taking effect - the problem though is that Qt::AlignVCenter has no effect, I cannot get the text to align vertically, here's an image of the result:
Immagine 2025-01-21 011540.png
Before you ask, I'm sure I'm not accidentally changing the Vertical Alignment anywhere else in the code, this because is a new project and that is pretty much all my code...
Bookmarks