Results 1 to 2 of 2

Thread: Move window in Clone Mode

  1. #1
    Join Date
    Jun 2006
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Move window in Clone Mode

    Hello

    I've dual head setup in Linux running in Clone Mode. And I'm trying to move my QWidget window from display0 to display1. Below is what I'm doing

    Window currently is on display 0
    Qt Code:
    1. [...]
    2. QWidget* parent = desktop.screen(1);
    3. setParent(parent);
    To copy to clipboard, switch view to plain text mode 

    According to documentation "destop.screen(1)" Returns a widget that represents the screen with index screen. And I assume if I make this returned widget parent for my QWidget window, it will move the window to parent's 0,0 location (moving to display 1). But during runtime i get

    Fatal: ASSERT: "!d->isWidget" in file kernel/qobject.cpp, line 1665
    Aborted
    Does anybody know what i'm doing wrong ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Move window in Clone Mode

    You can't use QDesktopWidget (and its screens) as regular widgets, so you can't set it as parent of some other widget. I'm not an expert at this, but I think you have to use some X calls -- Qt won't do the work for you here.

Similar Threads

  1. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 10:21

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.