Results 1 to 10 of 10

Thread: PRIMARY Selections

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Location
    istanbul, turkey
    Posts
    42
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default PRIMARY Selections

    Linux has three Selection mechanism for copy and past operations: PRIMARY, SECONDARY, CLIPBOARD.

    How can i get both CLIPBOARD and PRIMARY selections to set a QLineEdit's text.

    when a text is selected in any window then PRIMARY Selection occurs. And the text is implicitly exists in PRIMARY Selection buffer. When user clicks middle mouse button text is pasted to focused window. I need the text as soon as it appears/changes in PRIMARY Selection buffer.

    For example double clicking a text highligths the text, how can i get this text automatically into a qwidget(after double clicking). I wrote similar operation via QClipboard but it needs to explicit copy (menu->copy or Ctrl+C) on most of editors and text shown windows.
    If i use QClipboard it runs perfectly (because it automatically copies the selection to QClipboard i think) on QT Assistant's text but Open office word processor or Mozilla selections needs Ctrl+C.
    Last edited by hayati; 11th September 2006 at 09:14. Reason: extra description

Similar Threads

  1. Sharing Selections between Model and ProxyModel
    By mentat in forum Qt Programming
    Replies: 14
    Last Post: 27th January 2010, 17:31

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.