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. Strange problem, need help or suggestion
Forum Updated to NodeBB v4.3 + New Features

Strange problem, need help or suggestion

Scheduled Pinned Locked Moved Solved General and Desktop
1 Posts 1 Posters 148 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by SPlatten
    #1

    I've been working on this project for some time now, the GUI is for a hand held smart card reading device. I have a number of forms, each form follows the same design and the constructor for each form is very similar, one form I completed yesterday has today developed a fault.

    The fault is this, the position of the form is not where its supposed to be, according to the geometry reported in the constructor the geometry is supposed to be:

    0,20,240x300

    This is correct.

    When its rendered the actual form is appearing slightly shifted to the top left, I have no idea why this is happening and can see no reason for it in the source.

    I've also put debug statement in a button on the form which reports the same geometry as:

    -4,-14,240x300

    What could explain this? How can I trace what is changing the geometry?

    [Edit] I report the geometry as the last line before leaving the constructor, the geometry is correct. Then as the first line after object creation, i report the geometry again, still ok, the next line calls setWindowFlags:

       pForm->setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
    

    After returning from this I report the geometry again, now it's wrong...why?

    [Edit # 2] Fixed, don't ask me why it ever worked but for the past 5 weeks the code has been working ok, today it started exhibiting this problem. The fix was to move the call to setWindowFlags into the constructor after the call to setupUi, now its as before.

    Kind Regards,
    Sy

    1 Reply Last reply
    2

    • Login

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