Results 1 to 10 of 10

Thread: QLineEdit setAlignment doesn't set the Vertical alignment

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default QLineEdit setAlignment doesn't set the Vertical alignment

    This is my code below:
    Qt Code:
    1. MainWindow::MainWindow(CoreDictionary const& dict)
    2. : QMainWindow(nullptr), dict{dict}
    3. {
    4. ui.setupUi(this);
    5. ui.searchField->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
    6. }
    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...
    Last edited by Marcus Aseth; 21st January 2025 at 01:23.

Similar Threads

  1. QLineEdit doesn't recive any character
    By nemaider in forum Newbie
    Replies: 1
    Last Post: 2nd June 2021, 10:45
  2. Replies: 0
    Last Post: 5th September 2019, 18:01
  3. Replies: 2
    Last Post: 9th July 2016, 11:59
  4. Replies: 1
    Last Post: 11th March 2014, 12:20
  5. Replies: 0
    Last Post: 24th October 2011, 13:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.