Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Set Border for QtextEdit
Qt 6.11 is out! See what's new in the release blog

Set Border for QtextEdit

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 11.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vidhya
    wrote on last edited by
    #1

    How can i set border for QTextEdit

    Regards,
    Vidhya

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      QTextEdit is derived from QFrame.
      So look at the "docu of QFrame":http://qt-project.org/doc/qt-4.8/qframe.html :-)

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vezprog
        wrote on last edited by
        #3

        Use stylesheets...

        Example Stylesheet:
        @
        QTextEdit {
        border: 1px solid black;
        }
        @

        or
        @
        #ObjectName {
        border: 1px solid black;
        }
        @

        or
        @
        QString styleSheetString = "#QTextEdit { border: 1px solid black; }";
        ui->text_edit_object->setStyleSheet(styleSheetString);
        @

        there are many ways to do it....or you could use QPalette

        1 Reply Last reply
        0
        • V Offline
          V Offline
          Vidhya
          wrote on last edited by
          #4

          Thank you for your reply i will try

          Regards,
          Vidhya

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved