我试图在Qt中设计一系列带有箭头形状的自定义按钮,但我找不到方法。我需要类似下图所示的按钮之类的东西,以便管理程序的工作流程并指导用户进行操作。
图像的文本应为“步骤1”,“步骤2”和“步骤3”。对不起,这个错误。欢迎任何帮助或建议。谢谢你的帮助。
我正在执行Web请求以登录我的Web服务,但是我遇到了问题。我需要等到登录完成后才能结束启动登录的方法,因为我需要返回一个表示登录是否正确的布尔值。在以下代码中,我在需要等待“ httpWebRequest.BeginGetResponse(...)”结果的位置添加了注释。
public async Task<bool> login(string user, string passwrd)
{
mLoginData.setUserName(user);
mLoginData.setPasswd(passwrd);
string serviceURL = mBaseURL + "/pwpcloud/service/user/login";
//build the REST request
// HTTP web request
var httpWebRequest = (HttpWebRequest)WebRequest.Create(serviceURL);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
// Write the request Asynchronously
using (var stream = await Task.Factory.FromAsync<Stream>(httpWebRequest.BeginGetRequestStream, httpWebRequest.EndGetRequestStream, null))
{
string parameters = "{\"username\":\"" + user + "\",\"password\":\"" + passwrd + "\"}";
byte[] byteArray = Encoding.UTF8.GetBytes(parameters);
// Write the bytes to the stream
await stream.WriteAsync(byteArray, 0, byteArray.Length);
}
//httpWebRequest.BeginGetResponse(new AsyncCallback(OnGettingLoginResponse), …Run Code Online (Sandbox Code Playgroud)