i can print using txt file printer, however, when change docx or pdf many undefined characters cannot understood @ all. guys have ideas on how solve this. the code used. import system import javax.print import java.io java.lang import thread filestream = java.io.bufferedinputstream(java.io.fileinputstream("c:/geeks.txt")) psinformat = javax.print.docflavor.input_stream.autosense mydoc = javax.print.simpledoc(filestream,psinformat,none) aset = javax.print.attribute.hashprintrequestattributeset() aset.add(javax.print.attribute.standard.copies(2)) services = javax.print.printservicelookup.lookupdefaultprintservice() job = services.createprintjob() job.print(mydoc, none) thread.sleep(20000) filestream.close() .docx files have far more formatting , nonsense going on text file. open 1 using notepad , you'll see i'm talking about. because of this, you'll need use dedicated library read docx file, such https://pypi.python.org/pypi/docx/0.2.4 ...
i writing qtquick desktop application. use both c++ (for functionality) , qml (for ui) in it. use qquickview show interface written in qml. i want application reside in system tray when minimised. i mean functionality similar example. http://qt-project.org/doc/qt-4.8/desktop-systray.html . trying implement feature not find way in qt quick application. here main.cpp code: #include <qguiapplication> #include <qqmlengine> #include <qqmlcontext> #include <qqmlfileselector> #include <qquickview> #include "myapp.h" int main(int argc, char* argv[]) { qguiapplication app(argc,argv); app.setapplicationname(qfileinfo(app.applicationfilepath()).basename()); qdir::setcurrent(qapp->applicationdirpath()); myapp myappobject; qquickview view; view.connect(view.engine(), signal(quit()), &app, slot(quit())); view.rootcontext()->setcontextproperty("myappobject", &myappobject); new qqmlfilese...
when select refactoring > move on java class , result intellij warns that'll cause conflicts other classes. there way tell intellij move class along classes have conflicts well? edit: seems original question unclear i'm providing example. if have classa uses classb inside. if move classa directory (different maven module), classa can no longer access classb. ideally, intellij have option automatically move classb other directory well. when try move class(you can refactoring > move or hit f6 or drag&drop) intellij gives some options like: search in comments , strings search text occurrences search references etc.. if select these intellij handle dependencies. don't have worry them. check move class dialog
Comments
Post a Comment