Results 1 to 2 of 2

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

  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. Replies: 1
    Last Post: 20th November 2015, 11:02
  2. Replies: 3
    Last Post: 16th March 2015, 08:31
  3. cmake error with Failed to find "glu32" in ""
    By kennethadammiller in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2013, 00:12
  4. Replies: 3
    Last Post: 8th December 2011, 20:21
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 20: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.