Results 1 to 2 of 2

Thread: How to hide these two "properties" and "find printer..." push button in the Printer d

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2017
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default How to hide these two "properties" and "find printer..." push button in the Printer d

    The QT's QPrintDialog class does not provide interface to control these two push button .

    I read the Qt5PrintSupport lib source , can't find the dialog design based on the windows platform while the linux vesion may be could .

    Is there any method ? Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to hide these two "properties" and "find printer..." push button in the Print

    Putting aside that it is a very odd requirement (why would you want to not allow the user to find a printer?), I think modifying Qt code is a bad idea as it wont scale to future versions - even if you did find the right place for it.
    In addition, for Mac and Windows the native dialogs are used so you can't change them directly anyhow.
    I think your best bet is to implement the dialog your self, it should be rather easy to build a UI on top of the QPrinter utility classes:
    QPrintEngine QPrinter QPrinterInfo QPrintPreviewDialog QPrintPreviewWidget.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. cmake error with Failed to find "glu32" in ""
    By kennethadammiller in forum Qt Programming
    Replies: 2
    Last Post: 6th September 2024, 10:39
  2. Replies: 1
    Last Post: 20th November 2015, 10:02
  3. Replies: 3
    Last Post: 16th March 2015, 07:31
  4. Replies: 3
    Last Post: 8th December 2011, 19:21
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

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.