Page 2 of 2 FirstFirst 12
Results 21 to 29 of 29

Thread: Challenge + confusion while rotating main window with QT?how to do?

  1. #21
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Challenge + confusion while rotating main window with QT?how to do?

    dear wysota,


    I am rotating main widget to 90*,and its compulsory.i cant disable it. i have raotated it though QAddProxyWidget,and
    QGraphicsView.

    Now,when i roate widget to 0* or dont rotate,is shows the widget in an original position. But my requirement is rotating
    my widget to 90*. When i rotate it in my PC(qt sdk), it does not generating any scroll bar,which is good for me,becoz i dont want any scroll bar in my widget.

    But,when i compile it for arm board and run it on the board,is shows the 90* rotated widget in TFT touch screen. But,it also produces the scroll bar,which i dont want(scroll bar at left and bottom).

    AIM:rotating original widget at 90*. original widnow just tilted to 90*.nothing more or less should be seen.

    i am gtting scroll bar extra when i rotate it.

    thanks.

  2. #22
    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: Challenge + confusion while rotating main window with QT?how to do?

    Quote Originally Posted by savaliya_ambani View Post
    I am rotating main widget to 90*,and its compulsory.i cant disable it.
    Doooh.... Disable displaying the scrollbars.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #23
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Challenge + confusion while rotating main window with QT?how to do?

    Dear Wysota,

    lets start from the new one.wash out earlier.

    I have my widget1 to which i want to rotate by 90*. its a simple plane widget,ok?.My code for rotating it is as below.

    /****************start**********************/
    QWidget *widget=new QWidget();

    QWidget *widget1=new QWidget();
    widget1->setGeoMetry(0,0,480,800);

    //now i embed by widget into the view which i will rotate.

    QGraphicsScene *scene=new QGraphicsScene(widget1);
    QGraphicsProxyWidet *proxy=scene.addWidget(widget1);
    QGraphicsView *view=new QGraphicsView(scene);
    view.setGeoMetry(0,0,800,480); //Note: W and H will gets InterChanged after rotation
    view.setWidnowFlags(Qt::FramelessWindowHint);
    view.rotate(90*);
    view.show();

    /***********End***************************/

    Initially, Widget1 was a plane widget.it doesnt have any frame or scrollbar.When it gets rotated ,and shows me the rotated
    widget1,it has the scroll bar at Right and Bottom side.I dont from where and why the scroll bar gets included into it.

    When i disable rotation by simply comenting it,it oes not shows any scroll bar.

    I think scroll bar comes because of rotation only,and i have tested this thing.


    Kindly answer why this is happening.
    Thanks.

  4. #24
    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: Challenge + confusion while rotating main window with QT?how to do?

    Why don't you just tell your graphics view not to show the scrollbars like I already told you to do? By the way, if you have a view which is 800x480 in size and you try to place inside a widget which is 800x480 in size then obviously it will not fit because of the margin between the view and its viewport, regardless of the orientation.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #25
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Challenge + confusion while rotating main window with QT?how to do?

    Dear All,

    I have rotated Main Widget . And all the things working fine.

    I have fixed three buttons on it,and i have three persons information to show with respective to button pressed.
    so when any button event comes,it loads the information for that person.let say, btn1 for person1, llly for 2 and 3.

    when i press a button it gets pressed,than takes little time,and comes in a original postion.I mean to say ,
    it is taking a lot time.?( more than 300 msec),the response is very slow.

    In the same case ,if i didnt rotate the widget ,than the buttons gets pressed suddenly at a moment,and it is giving a very nice response.All the info gets loaded suddenly.

    Does any body know,why the rotating object takes a time.Widget is a parent and all the buttons on it are on it.

    Thanking you all.

  6. #26
    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: Challenge + confusion while rotating main window with QT?how to do?

    Quote Originally Posted by savaliya_ambani View Post
    Does any body know,why the rotating object takes a time.Widget is a parent and all the buttons on it are on it.
    Because it all requires math calculations that take time. If your device doesn't support rotating the screen (and the frame buffer, I suppose), you just have to live with it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #27
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Challenge + confusion while rotating main window with QT?how to do?

    Dear wysota,

    Thanks for providing me a very useful information. Now,we have to work with the slower speed of the event of all
    the object if we rotate the main widget which is parent.And our device is not suporting the rotation.we are using the
    atmel ARM9 Board and it has in built LCD controller.How can i add support of the rotation in this?

    (2)Is it possible to get the speedy response of a pushbutton,if we didint rotate the main widget,but we rotate a pushbutton it self?

    (3)Now, i have decided to design the graphics in a portrait mode which will fit to the LCD,which is also a portrait mode.But we all design the graphics on a PC which is landscape.So,i have to design all the objects whose text name goes from bottom to left on a PC screen.

    (4) W.r.t to (3) if i dont design text name from bottom to top,but i want to rotate only the text name,and than fits to the
    push button.is this possible to rotate the text name only?


    please reply me ASAP.
    Thanks to all.

  8. #28
    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: Challenge + confusion while rotating main window with QT?how to do?

    Quote Originally Posted by savaliya_ambani View Post
    How can i add support of the rotation in this?
    That's a question to the producer of the device not to us.

    (2)Is it possible to get the speedy response of a pushbutton,if we didint rotate the main widget,but we rotate a pushbutton it self?
    It will be better but slower than if you implemented your own rotated button like the one in our wiki.

    (4) W.r.t to (3) if i dont design text name from bottom to top,but i want to rotate only the text name,and than fits to the
    push button.is this possible to rotate the text name only?
    I think you still don't get what you are doing with Graphics View here and how it works. I suggest you do your homework right now and learn about it, otherwise you are just wasting other people's time and your own as well.


    please reply me ASAP.
    Never request such a thing here again unless you want to wait a very long time for a response. If you start rushing me, I don't see a point in helping you at all, you are not my boss that could tell me to do something quicker.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #29
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Challenge + confusion while rotating main window with QT?how to do?

    I am Sorry.

Similar Threads

  1. Replies: 11
    Last Post: 11th August 2008, 10:14
  2. Main Window
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 08:32
  3. Replies: 15
    Last Post: 23rd March 2007, 17:16
  4. Getting main window to run.
    By Doug Broadwell in forum Newbie
    Replies: 5
    Last Post: 18th October 2006, 00:56
  5. Main window
    By Michiel in forum Qt Tools
    Replies: 1
    Last Post: 21st March 2006, 00: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.