Results 1 to 2 of 2

Thread: Borders and shading for paper Qt4

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2011
    Posts
    5
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Unix/X11 Windows

    Post Borders and shading for paper Qt4

    hello everyone , i need to make a borders for my printing report and i need a function that move my logo into middle of my report at first line , how i can do these things in Qt4 ?? i write thia code using PyQt4
    Qt Code:
    1. QtCore.QObject.connect(self.pushButton_5,QtCore.SIGNAL(_fromUtf8("clicked()")),self.Delete)
    2. def Delete(self):
    3. self.printer = QtGui.QPrinter()
    4. self.printer.setPageSize(self.printer.A4)
    5. self.text = QtGui.QTextEdit()
    6. self.cursor = QtGui.QTextCursor()
    7. self.cursor = self.text.textCursor()
    8. self.image = QtGui.QTextImageFormat()
    9. self.image.setName("leaf.jpg")
    10. self.cursor.insertImage(self.image)
    11. pdialog = QtGui.QPrintPreviewDialog(self.printer)
    12. pdialog.paintRequested.connect(self.text.print_)
    13. pdialog.exec_()
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Nov 2011
    Posts
    5
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Borders and shading for paper Qt4

    Qt Code:
    1. self.text.setAlignment(QtCore.Qt.AlignCenter)
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. How to set paper size in QPrinter (example)
    By arreman in forum Qt Programming
    Replies: 2
    Last Post: 22nd August 2011, 05:43
  2. Paper on the Qt forums
    By Urthas in forum General Discussion
    Replies: 3
    Last Post: 22nd October 2010, 16:26
  3. Printer paper layouts
    By IsoArska in forum Qt Programming
    Replies: 1
    Last Post: 17th July 2010, 14:22
  4. TSP problem paper
    By mickey in forum General Discussion
    Replies: 3
    Last Post: 5th May 2009, 16:50
  5. Printing and Paper Geometry
    By croftj in forum Qt Programming
    Replies: 5
    Last Post: 19th December 2007, 21:29

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.