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. How to set absolute layout of the widgets in different qt app
Forum Updated to NodeBB v4.3 + New Features

How to set absolute layout of the widgets in different qt app

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 896 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.
  • C Offline
    C Offline
    choujayyl
    wrote on last edited by
    #1

    I use a QDeclarativeView * view to show my QML. app1 and app2 are two applications that show QML, and I want app1 to move out of screen and back, then lowers app1 to the bottom of app2.

    The issue is:
    •If I don’t use setWindowFlags(Qt::X11BypassWindowManagerHint), app1 cannot move out the screen
    •If I use setWindowFlags(Qt::X11BypassWindowManagerHint),view->lower() doesn’t work

    It seems let the app1 under the lowest, include under the Desktop that cannot see the app1.

    Here is my app1 code :
    @int main(int argc, char argv[])
    {
    QApplication a(argc, argv, true);
    QDeclarativeView
    view;
    QDeclarativeContext context;
    QDeclarativeEngine
    engine;
    Connector* connector;

    view = new QDeclarativeView();
    
    connector = new Connector();
    context = view->rootContext();
    context->setContextProperty("Connector", connector);
    
    
    context->setContextProperty("gRadioQMLDir", QDir::currentPath());
    view->setWindowFlags( Qt::FramelessWindowHint |Qt::X11BypassWindowManagerHint);
    view->setSource(QUrl::fromLocalFile("qml/Main.qml"));
    view->setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate);
    
    view->show();
    view->lower();
    
     return a.exec();
    

    }@

    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