Results 1 to 5 of 5

Thread: Changing widget position overlay on another widget while screen is resizing

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2015
    Posts
    4
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Changing widget position overlay on another widget while screen is resizing

    Good day experts

    I am designing an application for a data acquisition system using Qt. i need to place led control controls on picture that show the layout of the acquisition system. actually the led indicate the state of some sensors(safe,warning,alarm) shown on the picture as marker. when the screen resizes meaning that the picture sizes increases i need these leds to follow the marker position so that a led is always on a given marker.

    I have tried to reimplement the event resize method. I designed the gui with a given size, use that size width to position the led widget at a specific location on a marker when the gui is launched.When the users increases the screen size i tried to get the new screen width divide by some factor and passed it to the led for a new position. but the pos() only accept integers so the led cant be quite on the marker. also these seems to work for big difference between screen sizes change(the led approaches at least the marker). with small increments my algorithm the positioning is not working.

    lastly, i tried to design the gui for two screen sizes. the one that its get when launched and the one that it will get when completely maximized. this seems to work. but only if you don't tried any other screen resized in between. i am thinking of blocking any other screen sizes but these two.I have attached a picture of what i trying to do.


    Been looking around and trying stuff don't seems to solve my problem.any help would be much appreciated.

    Thanks in advance.
    Attached Images Attached Images

Similar Threads

  1. Replies: 1
    Last Post: 11th April 2012, 07:45
  2. Replies: 0
    Last Post: 22nd March 2010, 18:00
  3. Resizing child widget on changing size of parent?
    By anupamgee in forum Qt Programming
    Replies: 3
    Last Post: 13th November 2009, 08:39
  4. Layout (widget overlay)
    By whitefurrows in forum Qt Programming
    Replies: 3
    Last Post: 3rd July 2009, 23:54

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.