Results 1 to 10 of 10

Thread: How to achieve Uniformity...!!!

  1. #1
    Join Date
    Jan 2007
    Posts
    29
    Thanks
    6
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default How to achieve Uniformity...!!!

    Hello,

    I am developing an application. I have so many doubts... please let me know the solutions

    1. I want to disable the maximize/minimize button on my application

    2. I am using a graphical label widget(QLabel). I'm using this to display the .eps object. I want that object to be displayed exactly square. When i first designed (in Zenwalk), i gave absolute values; it was showing perfectly. When i tried in other distribution like fedora-6 that image is not perfect square rather it looks like rectangle and the image looks like somewhat pressed from left and right sides. How can i modify that object so that it should be perfect square irrespective of the distribution

    When i discussed this problem with some one, he suggested me to get the resolution or the number of pixels; i dont know how to get that.

    3. Is there any object in Qt3 which can display the postscript file as it is. That is an object which displays .ps or .eps files without converting to jpeg or jpg or any other. What i a m doing now is i'm converting .ps to .eps then to jpeg.

    thanks in advance
    Last edited by deepusrp; 5th May 2007 at 09:01.

  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: How to achieve Uniformity...!!!

    Quote Originally Posted by deepusrp View Post
    1. I want to disable the maximize/minimize button on my application
    Try tweaking the window flags passed to the constructor.

    2. I am using a graphical label widget(QLabel). I'm using this to display the .eps object. I want that object to be displayed exactly square. When i first designed (in Zenwalk), i gave absolute values; it was showing perfectly. When i tried in other distribution like fedora-6 that image is not perfect square rather it looks like rectangle and the image looks like somewhat pressed from left and right sides. How can i modify that object so that it should be perfect square irrespective of the distribution
    Make sure the sizeHint returns the proper (square) size of the contents and set the size policy of the widget to fixed in both directions.

  3. #3
    Join Date
    Jan 2007
    Posts
    29
    Thanks
    6
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: How to achieve Uniformity...!!!

    Thank you sir

    Can u give me a piece of code or the property name. It will be of more help

    What about the third one

    thanks once again

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to achieve Uniformity...!!!

    What about the third one
    3. No, unfortunately the is no such thing. You might want to think about using a third party library, like GhostScript. It is open source and there is also a viewer implemented, so you don't have to start from scratch.

    Regards

  5. The following user says thank you to marcel for this useful post:

    deepusrp (7th May 2007)

  6. #5
    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: How to achieve Uniformity...!!!

    Quote Originally Posted by deepusrp View Post
    Can u give me a piece of code or the property name.
    What property name?

    It will be of more help
    I'm sure you'll manage without it. It's a single line of code reimplementing the default sizeHint method.

  7. The following user says thank you to wysota for this useful post:

    deepusrp (7th May 2007)

  8. #6
    Join Date
    Jan 2007
    Posts
    29
    Thanks
    6
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: How to achieve Uniformity...!!!

    Thanks Mr Marcel 'n' Mr Wysota

    Mr Marcel, can i embedd ghostviewer into my application so that the user can view the file with in my apllication window itself. If so please tell me how; if possible with a piece of code.

    Mr Wyosta, The property which i asked was the form property, which property i have to change and to what. I have tried so many times, but i didn't succeed.

    Thanks a lot

  9. #7
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to achieve Uniformity...!!!

    Mr Marcel, can i embedd ghostviewer into my application so that the user can view the file with in my apllication window itself. If so please tell me how; if possible with a piece of code.
    It is not simple to do this.
    If you just want to display the PS file, you can make ghostscript give you a flattened version of the document ( an image, pixmap ) and you just paint it in your window.
    If you want to interact with the objects inside the file (texts, vectors), you will have to parse the PS with GhostScript and construct the objects yourself.

    A code snippet will not help you in this case.
    I suggest taking a good look at the GhostView sources. It also displays a rasterized version of the postscript file. Most application are not even concerned with the ghostscript sources. They just take gs32dll.lib and link with it. The API is decently documented on their site.You can use Google to find out more details.

    Regards

  10. The following user says thank you to marcel for this useful post:

    deepusrp (7th May 2007)

  11. #8
    Join Date
    Jan 2007
    Posts
    29
    Thanks
    6
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: How to achieve Uniformity...!!!

    Can i do the same using kparts. If so, how.. please give some code. I dont know parts.

  12. #9
    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: How to achieve Uniformity...!!!

    Quote Originally Posted by deepusrp View Post
    Mr Wyosta, The property which i asked was the form property, which property i have to change and to what. I have tried so many times, but i didn't succeed.
    There is no such property. You have to reimplement a method from QWidget.


    Quote Originally Posted by deepusrp View Post
    Can i do the same using kparts. If so, how.. please give some code. I dont know parts.
    We've already been through this topic. You were given a complete piece of code to achieve what you want. What more do you want?

  13. #10
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to achieve Uniformity...!!!

    Possibly. I have never used it... But, for example, the PostScript preview in Konqueror also uses GhostScript at some level.

    You can start here:
    http://developer.kde.org/documentati...orials/kparts/

    Next you can dig in the KDE sources, just to see how the PS thumbnail is achieved.

    Regards

Similar Threads

  1. failing to achieve desired size of a BitField structure
    By nass in forum General Programming
    Replies: 8
    Last Post: 13th February 2007, 14:29

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.