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. what if function of setdraenabled()?
Qt 6.11 is out! See what's new in the release blog

what if function of setdraenabled()?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 327 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.
  • H Offline
    H Offline
    Himanshu Meena
    wrote on last edited by
    #1

    i have written the following code
    ui->lineEdit->setText("lucky");
    ui->lineEdit->setSelection(1,2);
    ui->lineEdit->setDragEnabled(true);
    the output of the code shows lucky in the lineEdit but what new
    ui->lineEdit->setDragEnabled(true);
    had done.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      setDragEnabled enables dragging from this Widget
      https://doc.qt.io/qt-5/dnd.html
      So if you grab some of the text you can drag to any drop target that will accept it.

      1 Reply Last reply
      1

      • Login

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